"Coding" as a concept has existed in literature for a few centuries now, but it's never been tied to race and race only.
It actually comes from the concept known as "queer coding", coined during the late 20th century due to the fact that many animated Disney movie villains were obviously given homosexuality-related traits (Jafar, for example, wears very visible eyeliner and implied eyeshadow; or Ursula being blatantly based on a drag queen if we wanna be straightforward about it; or Him's entire schtick in PowerPuff Girls if you want a non-Disney example) because of the negative connotations at the time.
It's always been used as a way to evoke a particular disliked group without deliberately making a character, to be more precise a villain/antagonist, part of said group; and it applies to any historically prejudiced group, not just homosexuals or other races.
If you wanna see an example of the opposite, there's Shakespeare's The Merchant of Venice where the main antagonist, Shylock, is a Jew the protagonist owes money to, and William didn't hold any punches with making him a walking stereotype.
And that's what "coding" is, really, very subtle negative stereotyping. Alas, today it's just yet another watered-down term where, if a character checks enough boxes out (or you reach for straws hard enough), then they're TOTALLY [group]-coded, which means that they're TOTALLY part of that group.