The character of Greg Lestrade is a combination of Inspectors Gregson and Lestrade. In the books, the latter character's first name is said to begin with the letter G, but is never revealed. This is why Sherlock is always forgetting Lestrade's first name.
The role of Molly Hooper was never in the books or short stories and was only meant to be a one-off character to further indicate Sherlock's lack of social skills, particularly addressing any romantic encounters. However, Steven Moffat and other producers loved Louise Brealey's performance so much that they decided to expand her character.
Many of the crew in Sherlock (2010) are related. Sherlock's parents are actually actor Benedict Cumberbatch's parents, Wanda Ventham and Timothy Carlton; Amanda Abbington (Mary Morstan) and Martin Freeman (John Watson) were real-life partners; producer Sue Vertue is writer Steven Moffat's wife, and co-producer and writer Beryl Vertue is his mother-in-law; writer Mark Gatiss' husband is the barrister in The Reichenbach Fall (2012); Steven Moffat's son plays Sherlock Holmes as a child in a few episodes.
In this series, Watson was wounded in the shoulder but has psychosomatic/psychogenic pain in his leg. This is a sly reference to the original stories in which Arthur Conan Doyle was inconsistent about the location of Watson's war wound.
Sherlock sometimes uses a memory technique that he calls a "Mind Palace." This is not an invention of the screenwriters; rather, it is a method of aiding memory that dates back to Ancient Rome called the "Method of Loci". One of history's most famous real-life practitioners was the sixteenth-century Italian Jesuit missionary Matteo Ricci, who introduced the method to China.