Support encoding Structs nested inside Arrays and Slices.