Barney snogs Marshall in the first episode, just to show he's secure in his heterosexuality.
"Arrivederci, Fiero" has Ted and Marshall remembering the "100K Fiasco" (althought Marshall insists it's the "Fiero-asco") when they had to cuddle together in a car to keep warm from a snowstorm that stranded them in the middle of the road. Marshall was talking about how he decided that one day he would marry Lily, and then...
Ted: Marshall... Are you still thinking in Lily?
Ted: Please, stop.
When Ted gets into a car crash, there is a montage showing the people he loves most. Who pops up the most? Barney. A lot of the visions show him in various states of undress, to boot.
"Three Day Rule" is packed with this. There was Ted's fantasy of Marshall and Barney cuddling together in cheerleader outfits, Marshall and Barney on the brink of sexting Ted while pretending to be a girl he likes, and later competing over who Ted would rather sleep with. Not to mention the Ho Yay generator Stan, who has such a good grasp of romantic language that Barney and Marshall nearly fall for him.
Barney: Why do we keep trying to have sex with Ted?
Marshall: I don't know, it's weird.
"Unfinished" is practically a Ted/Barney fanfic come true. Barney starts putting on the moves on Ted because he wants him to take a job, and Ted lets him because he enjoys the attention. There is even this piece of dialogue:
Ted: Barney wants me to take the job so bad that he's putting the moves on me?
Marshall: I hope that's his end game... Actually I don't, I like you two together!
Lily says the same thing to Ted later.
Ted finally agrees to the job... But only under the condition that Barney have dinner with him. The last shot of the ep is them enjoying a romantic meal together.
Season 9 has Lily becoming crazy jealous after envisioning Robin with a new female best friend. The daydream ends right after Robin and her new BFF decide to have sex.
Then, when she and Robin kiss to snap Barney out of his drunkeness, she is over it and Robin is all Ho Yay.
Marshall's mistake when he didn't realize Scooter was Lily's high school boyfriend who was a lunch lady at her school and not a scooter for the lunch ladies.
In the episode "Slap Bet," after Barney tells Marshall that his hand is 'monstrous,' Marshall replies "What did you expect? You've seen my penis."
Lampshaded once more by NPH during the Comic Con panel, while bemoaning having to be slapped by Segel: "Have you seen the size of Jason Segel's hands?! They're mitts! They match his penis! It's not fun! Either of them!" (@ 8:50)
This extension of a scene in Season 3's "Third Wheel". (@ 3:26)
Barney's Relationship Advice speech to Marshall in "Bagpipes" starts with Barney talking over Marshall's shoulder, and ends with Barney's tongue practically in Marshall's ear while Marshall's eyes are almost completely glazed over. With a running theme in the episode about how hypnotically powerful this speech is to Marshall.
Barney: How 'bout we nibble on my brother's ding dong together?
In "The Perfect Week", Ted slaps Barney's ass reassuringly before he goes to pick up a girl.
And in "Say Cheese", Barney complains about Slash having grabbed his ass while they were taking a group picture, only for Marshall to interrupt and confess that it was actually him, because he thought Barney was Lily. They both cringe and leave it at that.
Ted and Barney in season 7, when they both get sick of waiting for the right girl and very, very nearly have a child together(well, adopt, but still). They also plan out an entire Heterosexual Life-Partners scenario where they just about draw the line at having three-ways together. This comes straight after a whole conversation wishing they were gay, and talking about how much sex they would have if they were.
Ted's employee at Mosbius Design quits the job and breaks up with Robin at the same time. Before leaving, he brings in a bouquet of roses and a letter. He gives the letter to Robin and the roses (plus a heatfelt "I'll miss you") to Ted...
Marshall baby talks to Ted on the phone, demonstrating separation anxiety for Kevin.
Ted and Marshall participating at the pregnant course without Lily.
Barney got really close to Ted when grilling him about the laser tag party he thinks Robin's throwing for him. Given the fact that Barney was actually planning an ice party for Robin and Ted was in on this secret, the "grilling" was quite unnecessary, other than just being for show. So why did he feel the need to get that close?
After nine seasons, Barney finally admits to being curious about experimenting with other males twice. The first is when he suggests to Robin to have an open relationship where they can bring in other partners, only women, but "at least once with a male just to see what that's like". The second is when he is so drunk in "Unpause" that he can only tell the truth. Robin and Ted start grilling him about his life, and we don't hear that exact question, but he tells them "Once. He was a French male model, we were the last two people in the club and one thing led to another." He immediately follows it up with "That was the only time I split tabs in a cab," but the implications are clear and deliberate.
In "Ring Up", Barney insists that he was feeling everything that Ted felt while banging a woman because of a "bro-nnection". Turns out the woman was Barney's half-sister which leads to this realization:
Barney: Now I know why I felt everything you did to her last night! It wasn't a bro-nnection — it was a sis-nnection! Oh my God! Ted, did you (whispers in Ted's ear) ?
Ted: (smirks) Big time.
And then later...
Ted: Barney, let me ask you something. Were you, uh, feeling a little sore this morning? Especially... (whispers in Barney's ear)
Barney: (gasps, flushing) FRIENDSHIP OVER!
Not to mention that Barney admits he misses one-night stands so much that at some point he gets a 'partial for Marshall'.