Rewrite arrayOfBytes<T> to not use NSData