There's prosopagnosia, "face blindness". That's the inability to recognize faces. More common than you'd think.
Not being able to relate to your own body is depersonalization. It's a common symptom of depression and panic disorders. Not being able to recognize that things in the world are real is derealization.
Capgras' delusion is believing that a person has been replaced by a robot or some other kind of impostor; Fregoli's delusion is believing that several people are the same person in various disguises (named after Italian actor Leopoldo Fregoli, a quick-change artist).
There's also Cotard's delusion. That's believing you are, more or less, a zombie: dead, decomposing, or missing body parts. It may cause you to believe that you are immortal, or that everybody else is dead.
And there's Truman Show delusion, the belief that everything around you is staged and you are being filmed all the time. Psychiatrists don't recognize this as different from other delusions of persecution.
Or you could take dimethyltryptamine (DMT, ayahuasca) and see imaginary elves. They've been reported by a number of DMT users. This is illegal unless you are a member of an ayahuasca-using indigenous religion. I'm not advocating it.
Capgras' delusion may be closest to what you are looking for. But it usually pertains to a loss of ability to recognize people well known to you for who they are. It doesn't quite describe a delusion where you believe just everybody is a robot. That sounds like it could be a kind of derealization, or even an unusual form of Cotard's delusion.
These delusions are signs of serious neurological or psychiatric problems. They have caused people to kill themselves or persons dear to them. But it doesn't always turn out badly. One fellow believes his wife has been replaced by an impostor. They've been carrying on an affair since 2008 and are doing just fine. Another woman believed the patient in the next bed was her husband. She was pleased that he no longer snored.