Although not commonly adopted it is possible to loop the wire from a roof light bar.
How to wire roof rack lights.
Use connectors if they are supplied with your lights.
Slide each end in a crimp style wiring connector.
Ask an expert wiring roof lights duration.
Connect the wire from your switch to the power wires on your lights.
The cabling is run along the length of the roof attached to the roof rack or rail and in the case of a ute will generally loop across to either the sports bar or headboard of the tray itself and head down to the chassis rail then off to the engine bay.
Some roof rack manufacturers may have optional light bar mounting brackets like this rola titan roof tray which makes installation as simple as spinning a few spanners.