public static function add(array $array, $key, $value): array
    {
        $target = static::get($array, $key, []);

        if (! is_array($target)) {
            $target = [$target];
        }

        $target[] = $value;
        $array = static::set($array, $key, $target);

        return $array;
    }