Be sure to check the tire clearance when building a flatbed. I have a friend who replaced his pickup bed with a flatbed after an accident. Turns out the rear tires would touch the flatbed when flexed out. They had to add mini-wheelwells to give enough space for the tires.
Lots of mini trucks with trays in Australia. Here's a Highrise camper on tray.
And here's the Innovan camper
Here's a Land Cruiser 79 with tray, set up for the Flyfishing the Globe expedition
Back in USA, here's an 81 Toyota with custom pop-top camper. Tire clearance might be an issue here.
and the Taco Chaser by Adventure Trailers