The Latin American countries that "projected" naval power were the ones that had naval power. Notably Argentina and Chile.
There were a few reasons. First, those two countries had the longest coastlines of any hispanic South American country (Brazil was Portuguese.) Second, they had more English (read "naval") influences than the other Latin American countries. (Chile had Admiral Cochrane, for instance.) Third, it was easier for either country to project naval power to Peru; Chile, obviously, Argentina through the Straits of Magellan, with the ability to resupply in Chile. Of course, their navies could go to the north Pacific as well.
On the other hand, countries like Venezuela, Colombia, and Mexico (whose ports were mostly on the Caribbean) would find it hard to project naval power to Peru or other Pacific coast destinations in the days before the Panama Canal. (They would have to go all around the Southern Cone.) Ecuador and Bolivia (which then had a seacoast) were "too small" in terms of economy and population.
Peru was the last Spanish colony to be liberated, by others, not through her own efforts, so she wouldn't have sent forces to fight Spain elsewhere. The Mexican navy wasn't created until 1821, when its war of independence was basically won, whereas the Argentine navy had been created a decade earlier, at the beginning of the independence struggles, and the Chilean navy in 1817. The Colombian navy played a limited role early in the war of independence because it was blockaded by the larger Spanish navy, but distinguished itself in the Battle of Maracaibo in 1823, in Venezuelan waters.