'An NPC' sounds nicer to me if it's pronounced as an acronym. If I were speaking, I would say 'an' and so I tend to write it that way. If I were to expand the acronym and say 'non-player character' then of course, I would shove an 'a' before it.