The "War movie" Mac and Dennis show Ben is Hellboy.
Charlie Day having previously worked with Guillermo Del Toro on Pacific Rim, offered Del Toro a part on It's Always Sunny in Philadelphia, as Pappy McPoyle: so the scene from a "war movie" Mac and Dennis show Ben is from Hellboy, which Del Toro directed.
Both Glenn Howerton (Dennis) and Tommy Dewey (Harris Marder) played Mindy's boyfriends on "The Mindy Project" (Howerton played Cliff and Dewey played Josh). Rob McElhenney (Mac) also had a small recurring part as Lou Tookers.