code: public static <C extends Collection<E>, E> C search(E[] array, Supplier<C> supplier, Predicate<E> predicate) {
          final Function<Iterator<E>, C> consumer = new ConsumeIntoCollection<>(supplier);
          final FilteringIterator<E> filtered = new FilteringIterator<E>(new ArrayIterator<E>(array), predicate);
          return consumer.apply(filtered);
      }
docs: Searches the array, adding every value matching the predicate to the
  collection yielded by the passed supplier.
  
  @param <C> the collection type
  @param <E> the element type
  @param array the array to be searched
  @param supplier the supplier of the resulting collection
  @param predicate the predicate to be applied to each element
  @return the collection provided by the passed supplier, filled with
  matching elements