You are putting the cart before the horse. Not all halogen under cabs install the same way. MOST of the 120V halogens can be directly wired and you can use the fixture as your jbox. The drawback being some of these units can't be linked and to hide the wire coming out of the wall you are sort of forced to mount the lights back toward the wall instead of out at the front edge of the cabinet. (It actually looks ok this way, but some folks have a problem with it.) If the fixtures can't be linked you now have to run romex between the fixtures. If your cabinets are continuous you can run the romex up inside the wall, then out and across the top of them and back down again. (You need to have a top molding on the cabinets so that no one will see the wire.) If they are not continuous you will have to run the romex down into the basement or up into the attic and then back down to the next set of cabinets. If you have low voltage non linkable halogens you will have a similar problem, except you will also need to hide the transformer someplace. Some 120 halogen under cabs come with a thin jbox that can be mounted under the cabinet. The lights aren't direct wire, but instead you use the manufacturers short pigtails to link the fixtures together and to the jbox. The advantage of these units is you can keep the fixtures out at the front edge without a problem. Personally I don't like the pigtails between linked fixtures because if you are sitting anywhere lower than the lights you can look up and see them. You can probably figure out a way to hide these, but I'd think that through before buying this type of fixture.
As for assembling your own led light sets, thats an ambitious project. I'm afraid I can't help you there. Good luck.
EDIT: Ok, I reread your second post about using puck lights. The type of light they provide is more like 'pools' of light then task lighting unless you mount them close together. I'd recommend larger fixtures if your goal is countertop task lighting. Also the wiring they are included with is not in-wall rated so you are going to have to figure out how to hide the wire. Also puck lights are not direct wire. They are ment to be plugged in someplace.
-rick