It depends on the data involved. Arrays are homogeneous though. So, if you have a lot of ints written in binary, an array is better. Most binary files are complex. Like you can design a format made up of separate fwrite calls, writing down different things.

I do not have a laptop and I can only use online compiler that cannot work with files.