SHAPE SHIFTER
I think what the actual questions tries to convey is how you call a character that is not good or bad, more like indifferent to the main storyline (the story the reader or viewer is following).
In literature we have the “hero”(we all know that one) the “anti hero” (the average person, unlikely to succeed in life who gets trapped in a complex series of problems, mostly unwillingly), the “unsung hero” (the one who sacrifices himself and nobody notice, except the reader/viewer).
In the lord of the rings Aragon would be the hero, Frodo the anti hero.
In “his dark materials” Lord Asriel and Mrs Coulter would be unsung heroes.
The question remains: what do you call characters like Illyria in Angel (spin off of Buffy), Seshomaru in Inuyasha, Cat and Fish in Gotham, Severus Snape in Harry Potter, Nebula in avengers or androids 16,17 and 18 during the second arch of Dragon Ball Z???
The tricksters? Don’t think so since they just find pleasure in causing problems but never cross certain line (which will turn them into villains) they have a tendency to add a certain sassiness and humour to their character (Loki in avengers)
Mostly this kind of characters feature in science fiction and anime, and I think the correct term (literary term) is “THE SHAPE SHIFTER” the one who goes from bad to good or vice versa, but of course it depends on the storyteller at which point it turns from a shapeshifter to a guardian or antagonist.
Since most of this characters share one thing in common (an stoic demeanour) I like calling them the stoic heroes (if they go from bad to good or stay ambivalent throughout the story) but I suppose shapeshifter IS the cannon.