Hi & Welcome.
Here is a guy who did exactly what you are thinking about (bed rails):
CB Antenna install
Note, unless you have a NGP (non-ground plane) antenna, I wouldn't do this. (composite material aka plastic = not a good choice for a proper RF ground)
Before the Wilson Antenna's site went down, they had a good schematic of best mounting locations. Roof #1, then I think rear of truck @ top of box (assuming metal box) was #2, driver's side front fender #3, & so on. I went with front fender location (on a quick-disconnect). Will save drilling roof for the VHF!
Here is my Cobra 75 WX ST install thread (3 pages long!) on CT4WD:
It'll give you some ideas on how to mount, running coax & power; and where I put the Cobra box.