I'll toss my hat into this ring.
The reason you quarantine new fish is because A) you don't know what diseases they have been in contact with. B) you want to make sure the new fish are healthy and strong enough to handle themselves in your main tank. C) after medical treatment or injury /disease recovery you want the fish to get to a stronger state before returning to the main tank. D) You don't want to bring in any unknown/unseen pathogens into your main tank.
IMO, you use a "Hospital tank" for treating fish diseases or injuries. What's the difference in the tanks you ask? A quarantine tank should be a less elaborate setup that mimics your main tank so that the fish can get used to your feeding schedule, lighting schedule, water change schedule and foods you feed all without the stress of having to compete with existing fish. A Hospital tank is more a bare bottom tank with simple filtration or just an air stone depending on what kind of medication you are using. In most cases, the medicines used have water changes included into the treatment so a " cycled" tank is not necessary for treating the fish. Because this kind of setup is temporary, it does not need to be up and running constantly, can be set up and used quickly and is usually a 10 gal tank for most smaller fish or a tank large enough to handle larger fish but in an increment of the medicine to be used. In many cases, the medicines are pre packaged for 10 gallons of water so if you measure out 5 gallons of actually water into the tank, you can split the dose in half and still be using it at full strength. Just a hint, a 10 gallon tank does not hold 10 gallons of water, even empty, so if you want to properly use the 10 gal dosage, you use a 15 gallon tank with only 10 measured gallons of water in it.
As for the medications themselves, there is no "One shot cure all" medicine so it's best to use the medications that are designed to treat the specific ailment your fish has. If you don't know what the fish has, I suggest getting a good book on fish diseases to help you diagnose the problem. ( The internet is not a good source of info for this.)For the same reason you don't go to a foot doctor to treat your high blood pressure, you don't add medicines that won't work on your disease/condition. There are a few good books on diseases with pictures of the diseases to better help you identify the issue. If you can get one that also has a diagnostic flow chart, that's even better. The ones I use are a " If this than do this, if that then do that" kind of flow chart.
As for how long to medicate all depends on the medicines being used. Some have a 1 day or 3 day or 10 day treatment. Some have longer treatments. It all depends on what you are treating. Antibacterials work differently than antifungals and antiparasitics work differently than the others. Then there are the antivirals.
You end up with a medical degree when you keep fish as a hobby.
As for length of time to quarantine: I'll say this, there are parasites that have a life cycle of 120+ days so any quarantining less than that can leave yourself open to infestations in your main tank(s). Bacterial issues generally start happening within a few days of arrival. Fungal issues can start about a week after an injury. Ich can happen usually within a few days but does not usually get the aquarists attention until it's a full blown case and spreading.
There is something else to consider: mixing wild caught fish with farmed fish usually ends up with a bad result because farmed fish tend to have mutated pathogens that differ from wild ones. In many cases, the farmed fish are raised in medicated water, shipped in medicated water, then medicated again when they get to the wholesaler and/or seller. The need to preemptively medicate is no longer a good idea. Treat only what needs to be treated. In the case of deworming, it's a good idea for most farmed fish. With wild caught fish, many places now have medications that they treat the fish with when they are first collected and housed before going to the shippers so again, preemptively medicating wild caught fish is not necessary. Treat any disease that arises. That said, many ground dwelling wild caught fish, including Cichlids, Gobies, Catfish, Geophagus, etc should be dewormed unless you know that the fish have already been dewormed after capture. There is a greater chance that they have worms than they don't.
Hope this helps.