Ayna asks about location; it is not the subject. In tamshī the implicit second-person pronoun is the subject.
Book example: أَيْنَ تَمْشِي؟
Where do you walk?
Ayna: interrogative place adverb built on fatḥ, in accusative adverbial position; tamshī: indicative verb with hidden “you” subject.