If I got to rewrite HIMYM
It would be something like this
Ted is bi. He dates both women and men, but tends to get more serious with women - his (entirely false & rooted-in-heteronormativity) belief is that he can’t get his two-kids-and-a-white-picket-fence-fantasy with a man
Barney is pan. He hits on everything that moves. Why deny anyone the pleasure of experiencing the Barnacle?
Robin is trans (her “I wanted a son, so I’m raising you as one” dad fucking sucks) and bisexual with strong preference for men. She’s also super aromantic, but she won’t realise that ‘til she’s dating Keving, and being in a relationship with a psychiatrist forces her to confront the fact that romantic relationships a) make her uncomfortable and b) don’t really last.
Lily? Also bi. Has known it and been out to her friends since college, but has only ever been with Marshall.
There’s at least couple of episodes dedicated to Lily struggling with feeling like she’s faking and/or missing out on something bc she’s never been with a woman. She works through it by finding wlw friends.
Plus Marshall supports her wholeheartedly.
Speaking of Marshall. The token straight friend of the group. The only True Ally and Acceptable Hetero. Except… there’s the time he has a crush on Robin’s rebound bf Gael. And the time he’s practically in a relationship with his law school buddy Brad. (Who, by the way, is trans.) And the way he’s obsessed with Don. And - -
- ohmygod, Marshall realises deep into the show’s fifth season, I’m so not straight.
“No shit,” Ted says when Marshall comes out to him - after telling Lily, of course. “Before you and Lily met and started dating, there was couple of days I was, like, 90% sure we were going to hook up. But congrats, buddy.”
On the subject of not hooking up:
Ted won’t sleep with Barney, no matter hard Barney keps hitting on him.
It’s a running joke at the beginning of the show. Ted keeps saying that he “just doesn’t find Barney that attractive”. Possibly with quick cuts to flashback scenes where he’s very clearly attracted to Barney.
Really the reason Ted won’t sleep with Barney is bc a) he doesn’t want to ruin their friendship and b) he knows that having that two-kids-and-a-white-picket-fence-fantasy with Barney is impossible.
This changes when Barney and Robin start dating, and it becomes apparent that he’s capable of serious relationships.
Those are confusing times for Ted. He’s not sure which one he should be jealous of, Barney or Robin.
After Barney and Robin break up, Ted and Barney hook up. Once. It’s an accident a la Barney and Robin hooking up in season three. They decide not to ever speak of it or do it again bc they both valuetheir friendships with Robin too much.
They are way better at not-talking and not-doing-it-again than Barney and Robin ever were.
In fact, they are doing ~fine~* all the way up until the whole “Hey, we should totally have a baby together. As friends.”
*by ~fine~ I mean hopelessly on-and-off pining after each other
They obviously give James back his baby daughter, and Ted still gets that heartfelt speech about the real deal waiting for him from James.
But this time it doesn’t make Ted realise having a baby with Barney is crazy. It makes him realise…
…that he really, really wants to have a baby with Barney. Just. Not as friends.
What follows, is intense mutual pining starring two equally obvious bros.
It’s driving the squad crazy.
Eventually Marshall confronts Ted, and Lily confronts Barney. Both deny having any feelings for the other. Despite being in the pining mode™ for real, they are still unsure if starting a relationship would a) mess up the group dynamic and b) be okay with Robin.
Lily and Marshall, frustrated with their friends’ hard headedness, try to get Ted and Barney together with more and more eloborate and ridiculous ways. Starting with ‘accidentally’ locking them up in a bedroom together & ending with a flat tire, bottle of champagne, and a real life puppy.
What gets them together in the end, however, is Robin.
She invites both Ted and Barney over for dinner bc Lily and Marshall aren’t the only ones fed up with pining idiots.
She comes out as aro to both of them, calls them idiots, tells them she’s more than fine with them getting together already, damnit & leaves them to have a nice candle lit dinner together.
And they do indeed finally get together.
The relationship isn’t all dancing on roses, but it isn’t unnecessary drama and jealousy either.
Their getting-engaged episode is hilarious. Barney has a super complicated Playbook plot, and Ted is planning something grand and romantic. Lily is terrible at keeping secrets, and ends up spilling both of their plans to the other. Logically that means proposing first becomes a competition. In the end, Ted beats Barney to it only by seconds (they reach in their pockets for the ring at the same time, but Ted knels faster) and crying Barney tries to claim letting Ted win was his master plan the whole time.
Ted loves him, so he says he believes that.
The last season still focuses on Barney’s wedding weekend. This time the grand best man drama is about who’s going to be Barney’s best man.
(Also about the fact that Barney keeps insisting the only reason Marshall’s Ted’s best man is bc Ted is marrying Barney. So therefore Barney is obviously the real best man in Ted’s life.)
In the end, Barney doesn’t have a best man. He has a best woman. Robin didn’t end up marrying either of them, but she’s still part of that wedding.
They live at Barney’s apartent for some time after the wedding, but move into Ted’s Westchester place when they decide they want to have kids.
After some hilarious happenings they find a lovely surrogate, who actually carries and gives birth to both Penny and Luke eventually.
“And that, kids, is how I met your mother.”
“Oh my GOD, dad. You definitely did not need to go that much into detail in telling us how you met our SURROGATE mother. Seriously.”
Nobody dies and everyone is happy. Lily’s art dealer career flourishes, Marshall eventually gets to be Fudge Supreme, Ted fucking loves being a professor, Barney completes his revenge plan and becomes a surprisinly happy (and popular) stay-at-home-dad and a dad blogger, and Robin is a hot shot international journalist who actually loves keeping in touch with her friends.