Generally if a thing is installed, it can't have a flexible plug-in cord. However, there's an exception for luminaires; it is permissible there. Don't make it super obvious; don't use an extension cord for instance. If you need a receptacle closer to your light, you can extend off existing receptacles (i.e. for your garage door opener).
You can't use just any cable tray for this purpose. Most of them are intended for ethernet cable, USB and the like. You need to use surface-mount conduit that is UL/CSA/TUV listed and rated for power cables.
For extending hard-wired circuits, proper surface-mount conduit is a thing and it is sold at local big-box stores. However the systems have many parts, and the big-box stores have computerized inventory systems and they don't stock the parts that don't sell well. This always leaves me in the lurch. You are much better off going to a proper electrical supply house, where they will stock all the parts for that particular system. Buy it all there.