Very few materia have five levels, but thankfully, All Materia has five levels and is used to max out money as it sells for 1.4 million gil. 35,000 AP is required to max out one All materia.
WHERE DO I FARM?
It's pointless to really farm for AP before getting the Tiny Bronco, so there's three places to look at depending where you are in the story.
1) If you have the Tiny Bronco, go to Mideel, south of Fort Condor. Battles on the beach or grassland give on average 200 AP per fight.
2) If you have the Highwind, go to Mideel and land next to the forest. Battles in the forest five an average 275 AP per fight.
3) If you can go to Northern Crater, go there. Battles specifically with the Magic Pot when giving them an elixir gives 1,000 AP per fight.
To stock up on Elixirs, the best way is to use the W-Item glitch. This uses the W-Item materia found in Sector 8 during the raid on Midgar, or dig it up in Bone Village next to the crashed plane when searching for Good treasure if you missed it. Using W-Item, select one Elixir and use it on someone, then select another item, but instead of using it, cancel out. Each time this is done, it duplicates the first item, and can be done up to the 99 item cap.
GETTING MORE ALL
All is sold at Fort Condor for 20,000 gil each. Buy as many as you need based on your equipment below. Additionally, every time you max out the materia, a new one is created, so you only need as many as you can fit into the entire party's slots at once.
Equipment falls under personal preference. You can either do a Double Growth weapon/armor that has four slots, or a Normal Growth weapon/armor that has eight. There are two exceptions to this rule.
Apocalypse, a Triple Growth weapon for Cloud with three slots. This is a chest in a puzzle section called Ancient Forest, which is located on top of the canyon south of Cosmo Canyon. To get here, you need to either defeat Ultimate Weapon, which creates a path to it, or breed a Green, Black, or Gold Chocobo to run up the mountain to it.
Javelin, a Double Growth weapon for Cid with five slots. Unfortunately, this is found in Gaea's Cliff, which is a one-time only area. Gaea's Cliff is reached after the events in The Forgotten Capital, crossing the frozen wasteland and ultimately climbing Gaea's Cliff. If you missed it here, there is no other way to get it.
If you still need a weapon for Cloud, go to Junon and bribe your way onto the elevator. Once you're in the city, run past the man shouting in the doorway to the alley with an arrow. This weapon shop has Rune Blade and Enhance Sword, Cloud's choices for Normal and Double Growth. If you need another character, Tifa's Kaiser Knuckle is here as well. Continuing on through the military sections, in the second apartment complex, take the second door on the right and go to the top floor for more choices of weapons.
For armor, the choice is either Rune Armlets, a Double Growth four slot armor bought from Bone Village, or Wizard Bracelets, a Normal Growth eight slot armor bought from Mideel.