static clone(arr) {
    let out = Array.isArray(arr) ? Array() : {};

    for (let key in arr) {
      let value = arr[key];

      if (typeof value.clone === 'function') {
        out[key] = value.clone();
      } else {
        out[key] = typeof value === 'object' ? ArrayHelper.clone(value) : value;
      }
    }

    return out;
  }
Clone an array or an object. If an object is passed, a shallow clone will be created.

@static
@param {*} arr The array or object to be cloned.
@returns {*} A clone of the array or object.