As far as I know, in Star Trek there was always a character, who explores the humanity.
Spock's goal was to learn how to reconcile human advantages and disadvantages.
Android Data looks like "Pinocchio", his dream was to understand human and act like them.
Odo's goal was to find his place among people.
All of them were true aliens and nearly enigmatic characters.
Actually, I don't think the purpose of Spock was to explore Humanity. The idea of a character who explores Humanity doesn't work for quite a few of the characters you mentioned. Spock had little interest in becoming human. Odo wasn't interested in being Human (or even Bajoran) at all.
Instead, I think the idea is more a character who is human-like, but still not. Rather than exploring Humanity, it gives them a chance to
comment on Humanity (because they reflect some aspect of it), but still remain outside it, giving them a unique perspective. it allows the writer to explore aspects of humanity from a very different point of view, increasing the story telling opportunities.
- Spock is half Human (giving him the ability to reflect aspects of it), but wants to be completely Vulcan, so Humanity is still alien to him.
- Data wanted to be Human (giving him the ability to reflect aspects of it), but can't escape the emotionless nature of himself, so Humanity is still alien to him. He's the anti-Spock in a way.
- Odo has lived all his life amongst bumpy nosed religious Human-representatives (giving him the ability to reflect aspects of them), but he has never been able to fit in, so Humanity is still alien to him.
- T'Pol was completely Vulcan, but has worked closely with Humans (giving her the ability to reflect aspects of them), but she can't escape the Vulcan upbringing she's had, so Humanity is still alien to her.
And in Voyager, we have two characters who fit this purpose.
- The Doctor is a hologram designed for one purpose, but he has to have a bedside manner to allow him to interact well with his patients. This means he has to reflect aspects of Humanity. This idea is massively expanded on with the Doctor's efforts to improve himself with singing, golf, sex, etc. So he's able to reflect all these aspects of Humanity. But he's never going to be able to excape the technological nature of what he is, so Humanity will always be alien to him.
- And Seven of nine is fully Human, but has lived most of her life in the Borg. So even though she's able to reflect aspects of Humanity, she's never going to be able to escape the life she's been forced to lead, and thus Humanity will always be alien to her.
It's a technique you've seen more often than you realise. A character who reflects aspects of something the writer wishes to comment on, but is kept from being a part of that issue. Optimus Prime fits this category, because even though he's an alien robot that turns into a truck, he still has to live among and work with Humans, so he must try to understand them. It works with more than just Humanity. Marty McFly in Back to the Future is thrown back to the 1950s, and he has to live in that time and fit in. But he can't escape his 1980s upringing. In Groundhog Day, Phil has to live for potentially thousands of years in a small town, living the same day, so he's naturally going to reflect that (and we see it as he becomes better and better at understanding the people), but he can never escape his own nature (which is why he has to change his nature to escape). In The Rock, Stanley is able to reflect aspects of the military team he's sent in with because he's been trained a great deal and knows exactly what he's doing in a certain field, but since he's not a military person he'll never fit in.
So it works with lots of things.