function removeFromArray(array, value) {
    var idx = array.indexOf(value);
    if (idx !== -1) {
      array.splice(idx, 1);
    }
    return array;
  }
Removes value from an array.
Presence of value (and its position in an array) is determined via `Array.prototype.indexOf`
@static
@memberOf fabric.util
@method removeFromArray
@param {Array} array
@param {Any} value
@return {Array} original array