If it is a binary file (a file for storing raw data), at the beginning of the file you can store 2 uint16_t values (aka unsigned short) that define the dimensions of the array. Then preform a loop that extracts data from the file. The amount of data after the 2 uint16_t values should be equivalent to the 2 uint16_t values multiplied together.