[...]
Yes. Before worrying about either, you really have to define
what the file should contain, in what format.
Agreed, but just saying you want a textual representation isn't
always enough. (Of course, we don't really know enough to say
more. Are the dimensions constant, or not, for example? Will
the file only contain a single array, or several?)
Portable, yes. Best? I don't know. If the file is to be
read by the same program (presumably the same platform), then
binary could actually mean (a) faster/quicker reading and
writing, (b) no loss of precision, and (c) smaller files (in
general).
If the file is to be read by the same executable (not the same
program, recompiled with a new version of the compiler or with
different options), and if the program is guaranteed to work
first time, and never need to be debugged, then yes, there's no
problem with binary, and it could be a little bit faster. If
the application really isn't fast enough otherwise, a binary
format could be considered.
If the file is not to be read by the same program, then the
format is dictated by the other program...
All of the programs accessing the file have to agree on the
format. Which is why it is defined before you write any of the
programs.