Hi Robert,
Why doesn't this work? Where visible is coming from an array of layerId's that are providing indexes for myQuery (it works for any random array eg ["alpha", "beta", "charlie"]:
var myQuery = ["Population>10000" , "Hispanic > 1500" , "Employees > 10000"];
var result = visible.map(function(e) {
return myQuery;
});