As I understand it, then, the preposition ar behaves almost like a verb! - at least in terms of the person-endings which it takes. There must be a fascinating history behind this feature of the language. I suppose the verb terminations must be archaic personal pronouns. I think something similar to this occurs in Hebrew.
The conjuation of prepositions (sometimes called prepositional pronouns) is found in all the living celtic language.
A number of other common prepositions also conjugate for person. You can look up the conjugations on the web - www.gweiadur.com has them, for example - but be aware that there are often several forms that are in use and that they can vary with register and sometimes by dialect. This course gives the common colloquial versions of those that it introduces.
Those that conjugate include: am, ar, at, dan, drwy, dros, rhag, heb, wrth, rhwng, o, i, gan, yn.