Use specialized writes for arrays

To avoid writing out struct alignment padding bytes (makes the binary more compact and provides more compatibility)