Some small performance improvements saving arrays of arrays

We will almost certainly need a different strategy here if we want to
perform within 1 OOM of serialize