Change so any byte or int collection can be written as an array.