The Rebel Flesh brought an unusual element of hard SF into Doctor Who. Programmable matter is an idea that nanotechnologists are actively working on. It's role in the story was to explore the familiar idea of artificial people - here, the "Gangers" (short for Doppelgangers were being used to undertake hazardous work (mining deadly acid) as a safety precuation for their human operators. The opening scene brought home how this could dehumanize the operators - when a Ganger falls into a vat of acid, his colleagues are more concerned about the loss of his protective suit than him - and at this point, we don't know that he's a Ganger.
The Doctor is clearly up to something - he's planning to drop Amy and Rory off for chips and deal with this one himself. It also becomes apparent later in the episode that he already knows something about The Flesh, and isn't telling anyone what. Having bluffed his way into the facility with the Psychic Paper (a device that's being used more sparingly of late), the Dcotor inspects The Flesh in its vat, and it inspects him. After the rather creepy sight of a Ganger being created, we get the solar storm that knocks everybody out, ruptures the acid pipes, and makes the Gangers independent of their originals. The Frankenstein reference is obvious, but it reminded me more closely of Short Circuit.
The Gangers now have all the memories of their human originals. As Rory gets to know Jen, we find that they are frightened and confused. So are the humans, who at first think of the free Gangers as nothing but a threat. The Doctor introduces the Gangers to their originals, and at first it seems that there's some sort of understanding developing between the Gangers and the humans. But as in The Hungry Earth and Cold Blood, somebody has to go and ruin everything - in this case it's Cleeve, the leader, who electrocutes one of the Gangers - I think. Since the Gangers look identical to the Humans at this point, it could easily have been a Ganger killing a Human, a Ganger killing a Ganger or a Human killing a Human. At this point, our sympathies lie very much with the Gangers, but as Ganger Jen, the one that we have most empathy with, encourages her fellows to rise up in revolt, the waters become considerably muddier. The humans try to barricade themselves into the safest part of the base, but Rory is left outside, and in with them is a Ganger... of The Doctor.
All the ingredients in this story are familiar - artificial humans, a base under siege, a conflict that The Doctor tries to prevent but can't, sympathetic monsters and unsympathetic humans, The Doctor being cut off from the Tardis, the duplicate of The Doctor. It's the way they've been mixed that comes off really well in this story.
One last detail... Amy saw the weird woman with the eyepatch again.