*************************************************************************************************
@method doSanitizeArray
@description doSanitizeArray
@param {xxx} arr -- xxx
@param {xxx} user -- xxx
@param {xxx} filterArrays -- xxx
@param {xxx} acl -- xxx
@throws {Error} -- xxx
@returns {xxx} -- xxx
function doSanitizeArray(arr, user, filterArrays, acl) {
  var result = []
  var processedElem

  arr.forEach(function(elem) {
    if (typeof(elem) === 'object') {
      processedElem = doSanitize(elem, user, filterArrays, acl) // recurse
      if (!processedElem) { // was filtered out
        if (!filterArrays) { // if not filtering then reject entirely
          throw new Error("User not authorized to see value")
        }
      } else {
        result.push(processedElem)
      }
    } else {
      result.push(doSanitize(elem, user, filterArrays, acl)) // otherwise recurse for prims and array
    }
  })

  return result
}