First, on an array that has 3 as size, you quite obviously won't be able to use indices beyond three, so my_array[248] - that's going to access some other number.
If you want to look up 248, then your array must be at least 249 in size [becuase elements are 0..248 -> 249 elements].
But you can write a section at a time or the whole array to file using fwrite(), and read it back again with fread().
--
Mats