Encode arrays and slices
Encode arrays and slices