can we move this to the new `writeDoubleArray` methods