Sodomy is both a real occurrence and an imagined category.
47, NASB) "Behold, this was the guilt of your sister Sodom: she and her daughters had arrogance, abundant food and careless ease, but she did not help the poor and needy.
Thus they were haughty and committed abominations before Me. 49–50, NASB) (Note that the Hebrew for the word "thus" is the conjunction "ו" which is usually translated "and", thus KJV, NIV, and CEV omit the word entirely.) There is no explicit mention of any sexual sin in Ezekiel's summation and "abomination" is used to describe many sins.
In Ezekiel 16, a long comparison is made between Sodom and the kingdom of Israel.
"Yet you have not merely walked in their ways or done according to their abominations; but, as if that were too little, you acted more corruptly in all your conduct than they." (v.
In Judges 19-21, there is an account, similar in many ways, where Gibeah, a city of the Benjamin tribe, is destroyed by the other tribes of Israel in revenge for a mob of its inhabitants raping and killing a woman.