public static function expandKey(array $array, string $key): array
	{
		if(strpos($key, '*') === false)
		{
			throw new RuntimeException('The key must contain at least one wildcard character.');
		}

		$keys = (array) $key;

		start:

		$expanded = [];

		foreach($keys as $key)
		{
			[$first, $remaining] = array_map('trim', explode('*', $key, 2), ['.', '.']);

			if(empty($first))
			{
				$value = $array;
			}
			elseif(is_array($value = static::get($array, $first)) === false)
			{
				continue;
			}

			foreach(array_keys($value) as $key)
			{
				$expanded[] = trim($first . '.' . $key . '.' . $remaining, '.');
			}
		}

		if(strpos($remaining, '*') !== false)
		{
			$keys = $expanded;

			goto start;
		}

		return $expanded;
	}