Support for set_pointer and indexing arbitrary objects via __getitem__/__setitem__