Correctly encode one-level double arrays