Well having dealt with UCMJ, pretty much any sex not for procreation is sodomy, which is punishable!
Having said that, and having spent 6 years in the Army as a bi male, as part of an open relationship, I'll say for the most part the Army really doesn't go on witch hunts looking for LGBT, poly or open relationships, or even adultery.
If it causes some issue and becomes a "known" fact then there are usually repercussions.
In my time in I'd guess over half of the soldiers I knew where involved in some sexual "kink" ( for lack of a better word) that could be punishable. Wether they were swingers, or strippers, crossdressers, gays bi's lesbians, poly's , into serious bdsm etc etc etc .
Most Commanders and NCO's think so long as your sex life stays in your " bedroom" so to speak and you do your job they don't make much issue into looking for things.
That said if you go on post with your husband, and your girlfriend and your boyfriend and your all giving PDAs your drawing attention that you'll get !
To comment about military, not having the "rights" of others, all I can say is We are all volunteers and can either accept the rules as they are or not join to begin with. There can be some need for some of the rules as NO civillian will ever be asked to order their subordinates to "fix bayonets!" nor would they ever be asked to decide which person is expandable based on the MISSION!