test for var arrays
vararray

these take a length encoding type and (currently fixed length) item encoding type.
then it encodes the overall length, then all the items.
Another approach would be to encode the number of items.
I am not sure which is better, but encoding the total length
means you only need to calculate one sort of length
(total length is needed to allocate the buffer, anyway)