Without a copy of the workflow and scripts involved, I can only speculate... based on what is shown and the final msg: "Not an Array", it seems your script may be returning what it interprets as an array, but when it gets to vCO it is a comma delimited string trying to be bound to an Array attribute or output. As this is likely the case, you would need to instantiate a new array within vCO's context.. perhaps something like:
var VMs = new Array(vmArray);
That is assuming vmArray is the return value from your script.
Again, this is all speculation