C (gcc), 225 207 202202 201 bytes
Thanks to ceilingcat for -2324 bytes
#define P strcpy(f+d,index("!?.",i[c-2])+!c? c;d;v(char*ii,int*gg,char*ff)char*i,*g,*f;{for(d=0;i[c];c++,d++)strcmp("[?]",memcpy(g,i+c,3))?f[d]=i[c]:(index("aeiouAEIOU",i[c+4])?P"An ":"an "),d++:P"A ":"a "),d++,c+=3);}