I always thought of them as being a miniaturized (compare to the ZAX supercomputers) Artificial Intelligence which was connected with an anorganic skeleton and organic replications of flesh and blood (essentially the same as humans have, only combined molecule for molecule). The artificial brain as the main processor controls all manners of lifelikeness by its combination with a synthetic nervous System.
Of course there would have been a long road of scientific progress that finally led to the creation of such a sophisticated synthetic human as A3-21/Harkness. The first step was probably the development of true artificial intelligence (perhaps the Institute tried to mobilize the ZAX intelligence and tried to upload it on smaller devices or emit it's processings into a recipient) which then got transferred into a mobile, robotic client. They now had to smoothen its motions, make it more lifelike and resembling true humans, while transcending the uncanny valley and the possibility of (non-)sensations beneath the human capabilities to mentally handle. Of course this probably all was an effort that would lead to the final possibility to practically immortilize people by transferring their organic brain into such a body that was capable of feeling like a real body feels. The AI was the test subject.
Of course even A3-21 isn't perfect. He still can be programmed. He's still infertile (as we can assume without any proofs). And although people automatically assume that the Institute made him follow them, it could be equally possible that he did so voluntarily at first, until he realized the doom he brought over beings that like him could feel.
Which would bring us to the point of why the synths are 'enslaved' by the Institute. I think they weren't created to be hard working labor slaves. But first let me hear what you think a synth really is (bashing is welcome)