Hydroflax

King Hydroflax was a merciless conqueror and pillager whose subjects included the people of Mendorax Dellora and the Shoal of the Winter Harmony. He was infamous as "the Butcher of the Bone Meadows", who ate his enemies after battle, alive or dead. He consisted of a cybernetic head and a massive robot body with an autonomous computer. His bodyguards were warrior monks genetically engineered with anger issues and armed with sentient laser swords.

In the year 5343, Hydroflax led a raid on the Halassi Vaults. The Vaults exploded in the ensuing firefight, driving the Halassi Androvar into his skull. River Song, who had been tasked by the Halassi to retrieve the diamond, posed as Hydroflax's nurse and seduced him into marrying her. Days later, she crashed his flying saucer into Mendorax Dellora, knowing she would intersect the Doctor's timestream there.

Hydroflax discovered that River had hired a surgeon, who was the Twelfth Doctor due to a mix-up, to take his head to get at the diamond. He ordered them killed, removing his head to prove a point. River and the Doctor seized his head and fled to the TARDIS, with his body in pursuit. After taking the heads of Nardole and Ramone, Hydroflax's body located the TARDIS and gained entrance. All three were transported to the Harmony and Redemption, where River planned to sell the diamond.

With the help of Flemming, Hydroflax's body reunited with his head. However, a scan revealed that the embedded and still-moving diamond had caused irreparable tissue damage and would kill him in seven minutes. Hydroflax ordered his body to do whatever was necessary for him to survive; the body thus concluded that he needed a new head and blasted Hydroflax's head to ashes. Hydroflax's body intended to take the Doctor's head as a replacement, but was interrupted by a meteor storm. The Doctor then tricked it into interfacing with a device that connected to all the banks in the galaxy, causing the computer to be "deleted in a merger".

After the Harmony and Redemption crashed into Darillium, Hydroflax's body was found with Nardole and Ramone's heads alive inside. Sharing control of the body, they became staff at the restaurant near the Singing Towers. (TV: The Husbands of River Song)

After spending 24 years with River Song on Darillium the Twelfth Doctor removed Nardole's head from Hydroflax's body, sewing it back on his own body. (TV: The Return of Doctor Mysterio)

Behind the scenes
The replaceable heads of the Hydroflax body inspired several characters of Doctor Who: Legacy mobile game, including ally characters for Nardole's and Ramone's heads.