Reserved1: How do you propose to recover 2 longs from the file if you only write 2 bytes to the file in the first place?
Reserved2: How do you propose to recover 3 unsigned shorts from the file if you only write 3 bytes to the file in the first place?

Write and read an array one element at a time for as many elements as the array contains.