Buy a copy of the book, Trekking California (by Paul Richins) and do hike #8, the Northern Yosemite Loop that goes to Benson Lake.
This loop starts outside Yosemite, in the Hoover Wilderness, at Twin Lakes. From there you cross over into Yosemite, looping through Peeler Lake, to Benson Lake, up Matterhorn Canyon, and back to your trailhead via Crown Lake.
It's only ~44 miles, but you make it longer by doing day-trips and peak-bagging to Volunteer Peak, Rogers Lake/Pettit Peak, and Matterhorn Peak. Benson Lake is worth a half-day layover, too.
Otherwise, my frank opinion is not to backpack in Yosemite. Yosemite is great for seeing the waterfalls in Yosemite Valley. Otherwise, Yosemite backcountry, to most of us, is actually less interesting/dramatic than the High Sierra further south. You could look into places like Kings Canyon National Park, or eastside trailheads near the towns of Mammoth, Bishop, Lone Pine, etc.