Library for serializable dynamic state keyed by type