Mapping slots of contained inventories (check the TODOs!)

I have written down how I would make the inventory access here.
It will probably run straight away if you fill in the required code which is marked with "TODO". :)