Question: can x be a vowel?
Answer: The choice of the indefinite article in English is purely phonetically based. Since the pronunciation of the letter X is headed by a vowel, an is the natural choice.