Without looking at a map
nor knowing where you are coming from, Highway 395 to 120 through Yosemite to Highway 140 down through Mariposa and on to Highway 49 would be great run as 120 has some breathtaking views through Yosemite. 49 from Mariposa would take you over to Oakhurst and to Highway 41 from there can go back through the Park or down to Fresno and hook into the Sequoia Park. Not sure...I'd get out a map...and see if there is a way down to Sequoia without getting into Fresno.
Sounds like a great trip...enjoy.