private Supplier<JsonNode> mergeArrays(List<JsonNode> arrayNodesToMerge) {
        if (!arrayNodesToMerge.stream().allMatch(JsonNode::isArray)) {
            // at least one value is not an array as expected, abort merge
            return null;
        }
        return () -> {
            Set<JsonNode> arrayItems = new LinkedHashSet<>();
            arrayNodesToMerge.forEach(node -> node.forEach(arrayItems::add));

            ArrayNode mergedArrayNode = this.config.createArrayNode();
            arrayItems.forEach(mergedArrayNode::add);
            return mergedArrayNode;
        };
    }
Check whether the given schema node and its {@link SchemaKeyword#TAG_ALLOF} elements (if there are any) are distinct. If yes, remove the
{@link SchemaKeyword#TAG_ALLOF} node and merge all its elements with the given schema node instead.
<br>
This makes for more readable schemas being generated but has the side-effect that manually added {@link SchemaKeyword#TAG_ALLOF} (e.g. from a
custom definition or attribute overrides) may be removed as well if it isn't strictly speaking necessary.

@param schemaNode single node representing a sub-schema to consolidate contained {@link SchemaKeyword#TAG_ALLOF} for (if present)
@param allOfTagName name of the {@link SchemaKeyword#TAG_ALLOF} in the designated JSON Schema version
@param reverseKeywordMap mapping from actual tag name in generated schema to underlying {@link SchemaKeyword}
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaCleanUpUtils.java