public static function cleanupMergedValues($array = []) {
        if (!is_array($array)) {
            return $array;
        }
        foreach ($array as $key => $value) {
            if($value instanceof IgnoreArrayValue || $value instanceof ReplaceArrayValue) {
                $array[$key] = $value->value;
            } elseif ($value instanceof UnsetArrayValue) {
                unset($array[$key]);
            } elseif (is_array($value)) {
                $array[$key] = static::cleanupMergedValues($value);
            }
        }

        return $array;
    }