I don't know if this fulfills your requirements, or why you would want to do this, but....
<?php
$result = array();
for($n = 0; $n <= 255; $n++) {
$b6 = sprintf("%03d", base_convert($n, 10, 6));
list($x, $y, $z) = chunk_split($b6, 1, '');
$result[$x][$y][$z] = $x * $y * $z;
}
echo "<pre>".print_r($result,1)."</pre>";