Swarmkeeper
Hero
Curse of Strahd has a nice way to deal with NPC v NPC action.
Beyond NPC allies, I do believe a three-sided battle - NPCs vs NPCs vs PCs - can be a fun and interesting twist to "standard" combat. Through experience, however, I've found that to pull it off most effectively, the spotlight needs to move quickly past the NPCs if they are attacking each other. IME, it is only truly worth rolling when the PCs are the ones being targeted. The players don't want to sit through the attack and save rolls of NPCs vs NPCs. Those rolls are decidedly an order of magnitude less on the the tension scale. The DM just needs to make a narrative judgement call and move on quickly to something that directly involves the players. I mean, players do get excited when an NPC takes out another NPC as that often gets the party closer to their goal but the players don't really want or need to see the NPC v NPC sausage getting made...
Specifically, at the Wizard of Wine Winery, there are four Swarms of Ravens in the rafters of the wine who help the characters by each taking out one twig blight each round of combat. No rolls, just gets narrated. And, it helps speed up the combat as there are 24 twig blights.
Beyond NPC allies, I do believe a three-sided battle - NPCs vs NPCs vs PCs - can be a fun and interesting twist to "standard" combat. Through experience, however, I've found that to pull it off most effectively, the spotlight needs to move quickly past the NPCs if they are attacking each other. IME, it is only truly worth rolling when the PCs are the ones being targeted. The players don't want to sit through the attack and save rolls of NPCs vs NPCs. Those rolls are decidedly an order of magnitude less on the the tension scale. The DM just needs to make a narrative judgement call and move on quickly to something that directly involves the players. I mean, players do get excited when an NPC takes out another NPC as that often gets the party closer to their goal but the players don't really want or need to see the NPC v NPC sausage getting made...