Can this be simplified?: byte[] arr = to!(byte[])(array(iota(byte.min, byte.max+1))); The +1 turns byte.max into an int that can store 128. So when I call array on an iota, I'll get back an int[] of [-128, ..., 127]. And I have to convert that to a byte[].