Writes an array to a node.
Arguments:
node: The node in which to write the array.
sz: Size of the data type.
ndims: The number of dimensions of the array, which may range from 0 to 4.
dims: The dimensions of each of ndims.
value: The array to write.
fmt: String representation of the data format.
typid: Reference to used data type. Must be set manually if using a compound data type, otherwise set it to -1.
Returns 1 if successful and 0 otherwise.