can we move to the new `writeDoubleArray` methods here?