Matthew Gray Gubler is one of a mere few series regulars who lasted the entire run of popular crime procedural Criminal Minds, during which he played the FBI Behavioral Analysis Unit’s walking encyclopedia/calculator hybrid Spencer Reid, who is actually an especially unique case for representation of mental health on television.
While his Asperger’s has proven undeniably effective in solving crimes, Reid also has a history of schizophrenia, which he inherited from his equally brilliant mother, played by Jane Lynch.
There is a character of almost that exact description (minus the engineering and pigtails, of course) on a show that is most definitely not for children and recently had its final curtain call after 15 seasons on CBS.