code: function subsetArray(array, intIdx) {
    var result = allocArray(intIdx.length);
    for (var i = 0; i < intIdx.length; i++) {
      result[i] = array[intIdx[i]];
    }
    return result;
  }
docs: Uses the integer indexes in 'intIdx' to subset 'array', returning the results.  All indices in 'intIdx' are assumed to be in bounds.