I stumbled upon this quite by accident. Kind of suspect it's already known, but anyway...
By spamming the buy button, it's possible to mount more than one weapon in a single slot. After this happened to me unintentionally, I made a test ship to confirm it and was able to mount eight guns on a VHF.
Docking anywhere will kick you out and remove the excess weapons.