remove(elem) {
    const arr = this.array_;
    for (let i = 0, ii = arr.length; i < ii; ++i) {
      if (arr[i] === elem) {
        return this.removeAt(i);
      }
    }
    return undefined;
  }
Remove the first occurrence of an element from the collection.
@param {T} elem Element.
@return {T|undefined} The removed element or undefined if none found.
@api