If you use focus, I could see this being very easy, because it is what I do for my mages.

I have 3 mages that I play with a priest and pal, so it takes 4 keys. Key1 = mage 1 focus pally target, key 2 mage2 focuses, key3 mage3 focuses etc... then Key4 is bound to a /cast [target=focus] polymorph macro.
For a 1 key button I think you'd have to have something like this:
Mage A's /target nearestenemy ; /cast polymorph
Mage B /target nearestenemy1; /cast polymporh
Mage C /cast Polymorph