Greve Moller's book on the uniforms of the war is an excellent source, worth getting. As has been said ACW and FPW French should cover a variety of the forces, as well as the Triple Alliance figures in kepi or shako.
You might need a bit of greenstuff for shako covers or the scarf a lot of Peruvian troops used, but the real difficulty will probably be finding figures in sandals I think. Gringo's Maximillian Adventure range has a few in kepi who might work, but it seems like he's abandoned that range so yes looks like you'd need a lot of mix & match.
Try Old West mexicans for some of the ununiformed Bolivian forces and civilians raised to defend e.g. Lima. One or two of the Chilean units wore cristino forage caps so you might find some figures in the perry Carlist War range, although the weaponry etc wouldn't match so depends how closely you want to inspect it all!