Years ago I had a one ton with an electric winch in the front of the dump bed. I rigged it with an A-frame made out of 2" schedule 40 pipe mounted to the very rear of the bed with bolts through the same tabs that the hinged tailgate had been mounted on.
The A frame was supported by a chain hooked to the front of the bed, slightly closer to the rear of the truck than the winch.
You could lower the cable to a chain around some large heavy object, lift it up to height, then keep reeling in the winch until the load was dropped into the bed as the A-frame went over the top.
You should understand that this method is VERY tricky to use, and once the A-frame goes beyond 45° from perpendicular, it is likely to flip over, dropping the load. We mostly used it to pick up heavy stuff to set on OTHER trucks, since getting a load on the bed it was mounted to was a precarious proposition at best. The lifting power was impressive, however.
Better: use 2 rigid stays instead of a chain at the top, then you would have a much safer loading device, and could be rigged to load itself. You would probably want to use pipe sections that fit inside each other, with holes drilled in them for adjustable length. Then you could really extend the A-frame for long reach, and pull the pins and shorten the rig for transportation.
You loose a lot of area on the truck bed for the structural elements of the hoist. By the time you are done, it probably won't be worth the effort unless you will use it to load other trucks.