"0" "1" are strings, not numeric values. It's useless to define something by selectRandom, then overwrite it by true.
in your code, _array1 is a string, then a boolean... but never an array! So select doesn't make sense here.
you just have to write:
[] exec (selectRandom ["spawn1.sqs","spawn2.sqs"]);
And you should write your code in sqf. sqs is an old language, totally obsolete for Arma.
To hide an object randomly:
- in editor
if (isServer) then {this hideObjectGlobal selectRandom [false,true]}; // in init field
- in script, name the object:
myObject hideObjectGlobal selectRandom [false,true];