code: public <T extends Collection<Val>> T nextCollection(@NonNull Supplier<T> supplier, String expectedName) throws IOException {
        beginArray(expectedName);
        T collection = supplier.get();
        while (peek() != JsonTokenType.END_ARRAY) {
           collection.add(nextValue());
        }
        endArray();
        return collection;
     }
docs: Reads the next array as a collection with an expected name and returns a list of its values
  
  @param <T>          the collection type
  @param expectedName The name that the next collection should have
  @return the collection containing the items in the next array
  @throws IOException Something went wrong reading