public ArrayNode withValue(Node node) {
        ArrayList<Node> newElements = new ArrayList<>(elements);
        newElements.add(Objects.requireNonNull(node));
        return new ArrayNode(newElements, getSourceLocation(), false);
    }
Copies the values from the current array node, adding the given node,
returning them in a new {@code ArrayNode}.

@param node The node to add.
@return Returns a new array node.
smithy-model/src/main/java/software/amazon/smithy/model/node/ArrayNode.java