.

.
There are plugins that let you control this, both for evented battles and random encounters, such as Yanfly's Force Advantage.
If you don't want to use a plugin, it will depend on how you actually want that to be done.

Will the game be running, the players be playing and then "boom" boss fight?

If so, you can create a parallel event at the place you want the boss fight to happen (or a public event).
Also create a switch e.g. "boss_fight". The event will trigger when the switch is turned on.

You also must decide like when (time window) it will happen and the conditions for it to happen (timer, player level, specific item, a counter for previous fights, etc).

Then you create another parallel event to make the switch trigger on those conditions.

You can add the autoswitch to the events and "stop event execution" to make sure it doesn't consume too much memory.
.
If I read your post right, you could just do a troop event at turn 0 using a force action whatever the surprise attack is supposed to be.

Original thread: https://forums.rpgmakerweb.com/threads/172516/