If you're going for pure AP, then obviously you want to have a Rabadon's Deathcap. It grants 120 AP, and has a unique passive that modifies your AP up 30%.
Another item you'll almost certainly want is Seraph's Embrace. It only grants 60 AP, but grants 1000 mana, and has a unique passive that grants an additional 3% mana as AP, this makes it worth more than a second Deathcap as soon as you have 1000 mana from other sources.
Lichbane is worth only 87.5 AP, not worth taking in a pure AP build
Rod of Ages is worth about 100 AP, still not worth taking in a pure AP build
Mejai's Soulstealer, fully stacked, is worth 180 AP, definitely worth taking if you can keep the stacks up. It drops to 124 on a single death. (13 stacks)
Deathfire Grasp is worth 120 AP, exactly as much as Rabadon's Deathcap, and would make a good filler item, as while the Active won't stack, you will get the 10% cooldown reduction repeatedly.
Zhonya's Hourglass is also worth 120 AP, and can be stacked for Armour.
Add in Elixer of Brilliance, and Exalted with Baron Nashor for an extra 80 AP and 10% CDR
Final Build: Boots, Rabadon's Deathcap, Seraph's Embrace, Deathfire Grasp, Zhonya's Hourglass, Mejai's Soulstealer. Elixer of Brilliance and Exalted with Baron Nashor.
=(120+60+120+120+120+40+40+3%mana)*1.3 = (620 + 3% mana) * 1.3 = 884 + 3.9% mana.
This itemization is the best you can do with boots for a generic champion.
This should work for almost any given mana'd champion with any given rune/mastery set. Here is a link to this build on Anivia (my main) for 1166 AP
Edit: Sorry, I missed the part about 3v3, That section below:
3v3
Rabadon's Zhonya's, and Mejai's are all disabled, as are Exalted with Baron Nashor and Elixer of Brilliance.
Wooglet's Witchcap, while only 100 AP, multiplies AP by 1.25, and so is still worth taking.
Exalted with Baron Nashor is replaced by Crest of Crushing Wrath, also worth 40 AP, while Elixer of Brilliance is replaced by Ichor of Illumination, which yields 64 AP, up from 40.
Additionally, the 2 altar bonus from Twisted Treeline gives an extra 10% AP. In total the build consisted of 3 Deathfire Grasp's, Seraph's Embrace, Boots, and Wooglet's Witchcap, and I was able to get 1131 AP.