First thing you really need to do is figure out how many lines you're wanting to run aft to the cockpit. Usually, these lines will include the following:
- Main Halyard
- Topping Lift
- Reefing Lines
- Boom Vang
- Boom Brake (if any)
By running these lines back to the cockpit, you can raise, lower or reef the mainsail from the cockpit. You can also control the mainsail's shape easily when under sail—with the outhaul and boom vang.
Some people will also run the spinnaker halyard or jib halyard back to the cockpit. On a boat with a roller furling headsail, it makes more sense to leave the jib halyard at the mast IMHO—since, you'll usually be furling it—rather than raising or lowering it from the cockpit. Running the furling lines back to the cockpit makes sense.
Once you know which lines you're going to be leading aft, you need to figure out how you will be leading them aft and to where. For instance, on my boat, I have three cabin top winches, two are the primary genoa winches and one is a winch I installed specifically for handling lines led aft. The six reefing lines* are led to the dedicated winch, and the main halyard is led to the starboard winch, and the outhaul and topping lift are led to the port winch. The boom vang will be led to the starboard winch when I finally install one, and the boom brake line goes to the port side, but not to the winch.
Usually, you will need turning blocks installed at the mast base or on the cabin top near the mast base. If you have a deck stepped mast, modifying the mast step to allow the blocks to be mounted to them has two major benefits. First, you don't have to drill a lot of holes in the deck. Second, the upward forces on the blocks is countered by the mast itself—since they're attached to its base.
From the turning blocks, the lines will need to lead to deck organizers. These are sheaves in a flat block that will allow the lines to turn horizontally as they are lead back to the cockpit. Positioning the line organizers is very critical, as you need them to lead fair to the line clutches the lines will run through.
The next element on the deck are the line clutches that will hold the lines fast. I highly recommend getting the Lewmar line clutches. Not only are these rated among the best by Practical Sailor, they're also among the least expensive and have the lowest line abrasion. However, because of the "domino" line gripper mechanism they use, they have a much smaller range of lines they can handle—so sizing them properly is key. They also allow you to ease the line under control and will not jam, unlike some of the line clutches from other manufacturers—particularly Spinlock.
Unfortunately, there isn't really a diagram of what works... since it will be a bit different for each boat, even if they're the same make and model, depending on what lines are led aft and what the choices the sailor has made are.
It pays to dry fit the various pieces and then run lines through at least the outer and innermost sheaves on the deck organizers to see if the lines lead fair or not—before drilling any holes. .
When drilling holes through the cabin top or deck, please make sure to properly pot any that are through cored sections.
* Please note: I believe a two-line reefing system is a far better idea and far easier to use than a single line reefing system. The main reason I prefer a two-line reefing system is that it gives you far more control over the reefed sail shape than a one-line system does.