test: add TestArrayOfStructWithStruct
encode: properly encode arrays of structs with structs (by value or embedded)
test: add TestSliceOfStructWithStruct
encode: properly encode slices of structs with structs (by value or embedded)