Refactor `Struct` class ref/set with cfunc env.

* Add few tests related to it.
* Add arena index restore for large struct creating.