Can you break up your Attack action for a bonus action?

You can do it to move:

If you take an action that includes more than one weapon attack, you can break up your movement even further by moving between those attacks. For example, a fighter who can make two attacks with the Extra Attack feature and who has a speed of 25 feet could move 10 feet, make an attack, move 15 feet, and then attack again. (PHB 190)

It would be necessary for the Great Weapon Master feat:

On your turn, when you score a critical hit with a melee weapon or reduce a creature to 0 hit points with one, you can make one melee weapon attack as a bonus action

As a level 17 Fighter, if I can not place a bonus action between attacks, there are two possibilities:

  1. I have to wait until I finished all 4 attacks of the action, to make another attack as a bonus action
  2. the bonus action attack is wasted unless the kill or crit happens on the 4th attack

So can I take a bonus action in the middle of the attacks of an action?