Format instance which encodes the collection by first writing the length of the collection as an int, then writing the collection elements in order.