Factor out the logic for determine the best numpy type for the given FSTD datyp and nbits.
When writing to an FSTD file, determine what type of numpy array is suitable for passing to c_fstecr.

Cast to the appropriate type if necessary.