public static <T> Collector<T, Json.Builder.Array, Json> toArray(BiConsumer<Builder.Array, T> accumululator) {
            return new Collector<T, Builder.Array, Json>() {
                @Override public Supplier<Builder.Array> supplier() { return Json.Builder.Array::newArray; }
                @Override public BiConsumer<Builder.Array, T> accumulator() { return accumululator; }
                @Override public BinaryOperator<Builder.Array> combiner() { return Builder.Array::addAll; }
                @Override public Function<Builder.Array, Json> finisher() { return Builder.Array::build; }
                @Override public Set<Characteristics> characteristics() { return Set.of(); }
            };
        }
@param accumululator Specify one of the 'add' overloads from {@link Builder.Array}
vespajlib/src/main/java/ai/vespa/json/Json.java