$array = [
['Синий', 'Алый', 'Коричневый'],
['Дерево', 'Сталь', 'Железо'],
['Корабль', 'Самолет', 'Поезд'],
...
];
$numArr = count($array);
$numElems = count($array[0]);
$combinations = [];
$numCombinations = pow($numElems, $numArr);
for ($i = 0; $i < $numCombinations; $i++) {
$combination = [];
for ($j = 0; $j < $numArr; $j++) {
$arrIndex = $j;
$elIndex = $i / pow($numElems, $j) % $numElems;
$combination[] = $array[$arrIndex][$elIndex];
}
$combinations[] = $combination;
}