http://selvedgeyard.com/2010/06/30/two-lane-blacktop-under-the-hood-of-the-epic-1971-road-flick/Article about the film that has an interesting quote from director Monte Hellman. The Mechanic was the very last role cast, just days before the cameras started rolling. Before the film's casting director Fred Roos, a friend of Dennis', thought of asking him, the following people had been approached or read for the role: James Caan, Robert De Niro, Al Pacino, and....wait for it....Randy Newman.
Of these, Caan had a mainstream Hollywood rep - and had never done a film as "underground" as this. De Niro had done a few films in NYC and one Hollywood picture, Bloody Mama, and Pacino had done only one film, a small role in Me Nathalie, and their credits were mainly off-Broadway theater; stardom was a ways in the future.
I suppose Randy was approached because he was a friend of the film's producer Michael Laughlin. Insofar as Randy's only acting roles to date have been in a couple of brief parts as a piano player, and once as the voice of a talking cactus in Three Amigos, this sounds pretty weird. His demeanor in the TV interviews I've seen sort of reminds me of the late Steve Landesberg, but this is certainly not the kind of role Landesberg used to play.