In what manner do you mean "unspecified amount"?
As you already pass an array to the initialize-methode of Window_Command you can pass as many commands as you would like.
Normaly when you create the command-window you create an array with the exact commands you need. But you can use every array that contains only strings.
So what do you want to know? With Array#push you can add additional objects to an arry (they are inserted after the currently last object). If you want to change the amount of commands after the window is created, this not possible without editing the Window_Command-class. One workaround could be disposing and then recreating the window, though i'm not sure this is possible without errors.
With Array#each you iterate over every item in the array, but i don't know if this it was you really need.