The sensor ground wires go both to the external 24V supply ground and the PMDX-126 "GND" on J12 and/or J11. This makes sure that the PMDX-126's ground is the same as the external power supply's ground. Without that, nothing will work (well, not reliably, anyway).
For limit switches and Mach3/Mach4, you can wire them all in parallel going into a single PMDX-126 input. However, the disadvantage is if you ever hit a limit you must use the "limit override" in order to move the machine off of the limit switch.
Perhaps a better scheme is to run all the "negative" limit switches in parallel into one input, and all the "positive" limit switches in parallel into another input. With this configuration Mach can figure out which direction is OK to move off a limit switch so you don't need to use the "limit override".
Some people also wire both "X" axis limit switches into a single input, both "Y" axis limits into a second input, and both "Z" axis limits into a 3rd. That leaves the 4th input to wire all the home switches (if you have home switches separate from your limit switches). This configuration allows you to know which axis hit the limit (in case it isn't obvious :) but then requires "limit override" to jog off the limit switch.