I don't have all the legal answers and most of it has been covered by others.
Can I legally set up my own coin-op arcade machines? Do I need the genuine hardware to play it? Is there any sort of special licensing I need to investigate?
Legally set up own coin-op arcade machines - probably, you need to look into business license restrictions, etc. Also, the machines usually have tax stickers on them, so you need to look into that, not sure how that works out.
Do I just need to buy the cartridge for the cabinet to be allowed to run it on a PC? How practical is making a coin-op DIY cabinet? Is it worth the effort at all?
We need to define some terms here . . .
Running the game in your own cabinet on a PC requires an emulator and the rom image on the PC's hard-drive. It does not require any kind of cartridge. Charging to play the machine is a violation of the MAME software license. Having the machine in a commercial environment on free-play, would be considered an incentive to the business and thus a violation of the MAME software license. Non-MAME emulators are less restrictive, but having the rom image on the machine is a violation of the original arcade manufacturer's (Midway, Gottlieb, Sega, etc.) copyright (IMHO, whether or not you also own the PCB). Currently, the arcade manufacturer's are for the most part looking the other way on private usage of ROM images, and we would like this to continue. Commercial PC cabs could end this.
48-in-1 and 400-in-1 arcade boards in your own cabinet are a gray area. I think the boards use some portion of MAME code and roms, but they are made overseas, so enforcing US copyright code is harder, and they are sold commercially, so they are more legal than setting up a PC in the cabinet. (Well, not more legal, but you personally are probably safer from direct prosecution).
Putting a dedicated board (say Pac-Man) in your scratch-built cabinet should be legal, but arcade games often sell at auction for $150-$500, and it will likely cost you almost that much for the wood, before you figure in the controls, monitor, marquee, etc.
Buying genuine games is likely your best option.