Implemented codecs for structs with references and ICollections