Zygote.jl-compatible dictionary-like mutable data types

to stack data without specified length, I utilised dictionary for my tasks.
However, I found that there are some issues using dictionary with Zygote for automatic differentiation (AD), e.g., like this.

Is there any mutable data types for unspecified data length with key-value pairs, which are compatible with Zygote and convenient to use in Julia?

See this to follow my strategy so far.