I have a small bath that I'm remodeling and trying to come up with a creative way to use a particular light fixture. My initial plan was to mount them in the normal way above the vanity on the wall behind the vanity. But one fixture would be especially close to the corner wall. So, my brainstorm is to mount that side ON the side wall and then to build a custom, very narrow cabinet unit that would hang on the other side of the vanity from the wall behind the vanity. It would be a very unique design and functional to attach the light fixture for this side to the side of this cabinet. Question is how to do that in code-compliant way?
Currently, there are code-legal, inspected and passed boxes (for fixtures) in the wall behind the vanity. If I essentially hung the cabinet over the top of one of them I would guess I can't just snake the wire out of the wall into the cabinet to hook up the light fixture. But I've seen something similar in a high-end hotel with the bed unit. So how do they do it? Basically, the bed unit had two wall-hung bedside table units, each with a sconce light attached directly to the wood. In their case I think I remember looking and seeing that they were simply plugged into an outlet.
But is there a legal way to actually mount a fixture-type box inside the cabinet itself? I want to do this in a code-legal way.