Medium armor is capped at +2 dex bonus, so (barring enchantments) you are capped at 17 AC with 14 or higher dex and the best medium armor (ie. Lazaels armor).

Mage armor can get to 18 (+3 from mage armor +5 from dex) but that of course requires a 20 dex, which is probably not a priority for a mage.

A rogue in "mundane" light armor is capped at 17, just like medium (2 from studded leather and 5 from dex).

Heavy armor does not allow any dex bonus at all, but you can get to 18 with full plate.

So basically each line of armor has similar potential, but you reach that potential in slightly different ways. The main reason to pick up medium armor on a caster is so that you don't have to push dexterity to 20 in order to gain acceptable AC.