Cable boxes can already be installed when the ceiling is poured. You bend out the mounting ears at the face side and nail or screw the box down on the concrete formwork. So the box can be poured in during a normal structural process. If the surface is not level it is important, of course, to seal the down brink of the box so that no concrete can run into it.