I wonder if it was the Elements that turned him into living shadow, or someething else.
Seems to be something of a swiss-army magic, the Elements.
Nightmare Moon was stripped of the dark powers that granted her strength and corrupted Luna's mind further, reducing her to what she once was. However, when Celestia used them by herself, it "merely" trapped her within the moon.
Both times it was used on Discord, it transformed him into a statue of stone. The second time (and presumably, the first time), it wiped the effects of his chaos magic from the land.
And presumably, when it was used on Sombra, it transformed him into living shadow, and bound him within the ice.
I wonder if there's a common connection between them. It seems that the Elements have the power to transform, cleanse, and bind. It bound Nightmare Moon into the moon, bound Discord within his own stone shape, and bound Sombra within the ice. It transformed Discord into stone, and Sombra into shadow. It cleansed the dark power from Luna, and purged Discord's influence from the world.
I would almost think that the elements reveal the truth in the target's heart. It returned Luna to what she truly was, and gave King Sombra a form as black as his heart. But that doesn't really jive with Discord...
Argh. It's too mysterious. I want to find a connection.
I have a message from another time...