“An” is an adjective (isn’t it?) while “in” is a preposition.
Broadly, yes, although with
a and
the,
an falls into the special category called "articles." Prior to 1800 or so,
an was also used as a conjunction with the same meaning as
if. Shakespeare's plays are full of instances where characters say "An it were true, then …" or something similar. Indeed, there might even still be rural or backwoods people in places such as Yorkshire and Kentucky who use conjunctional
an. There certainly were when I was a boy sixty-plus years ago.