Add backends integration test for roundtripping datetime arrays

Not sure how we missed this before.

Also includes a fix for writing datetime arrays with missing values.