runtime: Make ivars opaque and provide an API