@Override
    public Type getType() {
        if (values.isEmpty()) {
            return Type.arrayType(Type.emptyType());
        } else {
            Type first = values.get(0).getType();
            for (Value value : values) {
                if (!value.getType().isA(first)) {
                    throw new SourceException("An array cannot contain different types", this);
                }
            }
            return Type.arrayType(first);
        }
    }
Gets the value at the index, or an empty value if none is present.

@param index the index to get the value of.
@return the value at the index, or an empty value if not present.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/evaluation/value/ArrayValue.java