How to queue up character actions?

I am trying to set up a queuing system where I can input some commands, that will be stored and then acted out by the character, in the certain order I defined them to (and be able to modify the list and the order of the action items on the fly in game). How can I set up something like this?

Make an array with integers (as action identifiers) and switch on them. If you want to reorder the actions, reorder the array. If an action was acted out, delete it from the array.

Finite State Machine.