No you can't store variables in OPcache, but statics in classes work:
class Resource {
static $image = [
'stone'=>'current_stone.gif',
'stick'=>'uglystick.jpg',
...
];
}
...
echo Resource::$image['stone'], "\n";
This saves all of the opcodes initialising the arrays, but OPcache will still deep copy the version of Resource::$image in the compiled script in SMA into the corresponding class static property in the process space, so you will still have a copy of the HashTable in each of the active processes which are using Resource -- though the strings themselves will be interned and hence shared across all active php requests which are using this class.
If you are using a class autoloader, to load your classes, then you don't even need to do anything other than refer to Resoure::$image...
and the autoloader will do the mapping for you.