Object interaction and collision box

Hello, this is something hard to explain but I will try my best. I was wondering it’s possible to have an object similar to an ant farm, a rectangle with some tunnels and with a key inside with the objective of taking the key out using some magnet outside the rectangle. And if that is the case, how? As all I can think about is that if the rectangle has a colliding box then is not going to be possible to have a key inside, correct me if I am wrong. Any help is appreciated.

Thank you in advance.