3
To give a simple question, yes, you can, but it is very complicated.
About 10 years ago I've done a similar journey but I found that walking around Lima and west and south of the Andes very hard so I ended up using public transportation.
Walking in the Andes is very challenging as weather conditions are rapidly changing and you will have cold temperatures ...
3
The University of Texas Library has some decent 1:100,000 topo maps of Peru for free download:
http://www.lib.utexas.edu/maps/topo/peru/
Sample (Machupicchu):
Only top voted, non community-wiki answers of a minimum length are eligible