Up to the Table
As T.J.L. states in this answer, there is no RAW direction here and both that answer, mine, and others will be coming from an opinion/experience viewpoint.
The advice in that answer is excellent, but I'd like to offer a different option that is less friendly to the PCs (unfortunately.)
Ultimately, the DM determines Monster order. Whether the Barbarians under Hypnotic Pattern act first, last or somewhere in between is up to the DM. At the start of the Monster's turn, the DM should announce what the plan is. Undestanding how you normally determine order will help maintain consistency and player expectation
- Allow the unaffected Barbarians to go first and give them an opportunity to break the spell (either by hurting the Bard, or waking up their friends if the DM feels that is what they would do.)
- State that the affected Barbarians are out for the turn and only direct the unaffected Barbarians.
- Randomly roll for either of the above or something in between (roll an initiative order for each of the Barbarians.)
Rounds and Turns
From the standpoint of the spell, it may also be helpful to understand in what round the Barbarians are going.
If they are up after the Bard in the same round, I think it's reasonable to say that the unaffected have a chance to "free" the affected and give them their turn.
If they were before the Bard and their next turn isn't until the following Round, it is reasonable to say that those affected do not get their turn.
In my opinion, the breaking of the spell should generally free any remaining creatures affected by it. The players would want their teammates to free them and still get an action, so the monsters should be given the same rights and option as well. Expecting the monsters to have a different order simply because they share their turn isn't logical or equal.