Nope. You’re slightly in error, there.
Paraphrased, the FAA regs only state that, whatever you choose to drop from an airplane, it’s OK as long as nobody gets hurt and nothing gets broke. I do caution this applies only to the United States - laws and regs may be very different elsewhere.
Hunting from an aircraft is, indeed, not permitted
Now, in order to mount, as in, affix to aircraft. a weapon would require considerable paperwork, the time and labor of a certified mechanic, and some money. IF the FAA approves it. Which isn’t very likely. Much easier just to carry side-arms if you must be armed and flying.
But there’s an even better reason police don’t normally fire from choppers - a helicopter is NOT a stable platform! They swing, shift, sway… the recoil from a gun wouldn’t help, either. yes, the military does have helicopter gunships - with laser targeting systems and weapons that don’t require pin-point precision. Prior to the fancy electronics, it was some poor guy standing in the door with a machine gun or other weapon that, again, did not require precision targeting to get the job done. The standard copper-chopper isn’t designed for that sort of thing, doesn’t have any targeting aids, and in general is just not a very good choice for sharp-shooting.