Some of those very themes were touched upon in 'Blade Runner' (an excellent movie) if I recall rightly.
Yes, you do recall correctly, and agreed, it is an excellent film.
In any case, I cannot envisage artificial life-forms being allowed to develop to that level without some sort of control, or inhibitions, or limitations being written into their commands, perhaps something on the lines of Isaac Asimov's Three Laws of Robotics.
In the absence of such controls, or inbuilt limitations, I would be surprised if sentient machines were simply developed into a clichéd male wish fulfilment fantasy (though some movies and ST - including a few STNG - episodes might lead one to that conclusion); it is more likely that any such revenue as might be ear-marked for the development of such machines would be channelled into security and military, - and later - perhaps - commercial enterprises.
We recall the episode of STNG where Lt.Cmdr Data is on trial for his "life" and how they had to justify his existence and prove he was more than just a machine. Starfleet's position was that he was only a machine, a military tool, and could be decommissioned, destroyed, or turned off as the needs of the fleet required.
Data's comrades begged to differ and showed how he was just about as human as they were.
No doubt, government's would likely step in on private companies or universities that are working on AI when/if they get to a point depicted in many films. Perhaps they'ed implement the 3 robotics laws, or a variation of them.
If past practice is any indication of the future, the militarization and/or commercialization of AI will be inevitable.
But barring all of that, let's say AI is developed to a point that is better and more human that Mr. Data was depicted to be, how do we think society would handle it? I think, at first, that the AI would find it difficult to integrate into a human society and would have to endure, the unfortunate, and all-too-common, prejudices that humans have against things, peoples, cultures, that are different from them.
There would be a contingent of society that would embrace the AI and "fight for their rights" for equality in society. It could take many years and generations of people and time before, or if, AI could be fully integrated into a human society.