Wryting byte arrays from various byte array