You can easily put a later tailgate, such as one off of an 83-86 truck, on an earlier bed, such as an 80-82. The differences in the two tailgates are shown in the first picture. As you can see, the later 'gate, shown on top, has cables and two bolts for the latch. The earlier gate has straps and 3 bolts, with the strap attached to the latch. So, while it would be possible to install the later latch on an earlier gate or vice versa, I don't think that is a good approach due to the different clearances cut on the 'gate to clear the cable as well as the differences in bolt holes.
The best way, IMHO, is to put the later gate on the earlier bed, as follows:
I assume it would be possible to put an earlier 'gate on a later bed. However, you won't have the flat in the hole for the strap bolt so you will have to ensure it is oriented properly so you can get the straps off. And, because of the shoulder on the bolt I'm not sure how it would settle into the larger hole. Also, the earlier bed is reinforced where the bolt goes through, as you can see in the 2nd picture, but I'm not sure that the later 'gate is. The fact that I don't have any nuts from the hardware I've taken off of later 'gates tells me that the later beds have a welded-in nut/reinforcement plate, which may pose a problem as well. Good luck!