code: public static <R extends Collection<E>, E> R all(E[] array, Supplier<R> supplier) {
          final Function<Iterator<E>, R> consumer = new ConsumeIntoCollection<>(supplier);
          return consumer.apply(new ArrayIterator<>(array));
      }
docs: Yields all elements of the iterator (in a collection created by the
  supplier).
  
  @param <R> the returned collection type
  @param <E> the collection element type
  @param array the array that will be consumed
  @param supplier the factory used to get the returned collection
  @return a collection filled with iterator values