I own neither Doctor Who, where I got the idea for the Rani, the TARDIS, or Harry Potter.
The Rani.
Ursula Potter was a genius.
She was good at chemistry, physics, biology, electronics, engineering, mathematics, computer science, geometry, music, ballet, you name it, she was good at it. She was also a girl who lived in New York, without a family. When she was younger she was living in a foster home, and she grew up knowing little to nothing about herself.
There was also something not quite right about Ursula; she was autistic. She possessed a high degree of photographic memory, she was good with figuring things out what would, in turn, make other people tear their hair out in frustration. When she was younger, she was obsessive about keeping all her things neat and tidy.
It was the way society treated her that made her hate the human race. People treated her like dirt under their shoes, they tarred her with a judgemental brush, but she didn't care. In her mind the human race were insane, she was the only one who was sane. And since when she was child she'd been tiny and doelike, people bullied her, only to be driven off when she reacted with violence. Ursula didn't know anything about her past, she had other things to concern herself with, like her life, and her research.