Torches can be placed on the sides of fences. They will have a vertical orientation and float above the ground, not touching the fence. When the fence is destroyed, the floating torch will fall as resources.
To see this effect, build a 2-block high fence in an open area and place a torch on the side of the top fence block.