How do I set up functional tile structures on TileMap?

Godot Version 4.3 Beta 1


I would like to set different tile structures, for example like the bed in the screenshot, it is a 1x2 tile structure (or 2x1 if put horizontally). But at the same time such a structure should be able to be functional, like changing animation, storing data (e.g. whether the bed is occupied by someone), ability to cast a shadow, etc. Is it possible to realize such a thing with the help of the engine or do I need to write such functionality myself?