public static <T extends ToNode> Collector<T, List<Node>, ArrayNode> collect(SourceLocation sloc) {
        return Collector.of(
                ArrayList::new,
                (results, entry) -> results.add(entry.toNode()),
                (left, right) -> {
                    left.addAll(right);
                    return left;
                },
                results -> new ArrayNode(results, sloc, false));
    }
@param sloc Source location to use on the created node.
@param <T> Type of value in the collection.
@return Creates a collector that create an ArrayNode.
smithy-model/src/main/java/software/amazon/smithy/model/node/ArrayNode.java