While modularity is desirable from certain points of view (for example, the carrier vehicle is the same across many units, so parts and supply is eased), there has to be a careful look at the cost/benefit ratio of what you are doing.
Generally speaking, modularity comes at the price of having extra "structure" on the host vehicle for mounting points, couplers to power and utility services and data connections to sensors, the fire control system or whatever other system the module is hooked into (power, life support, even modular crew pods will need some sort of data system to communicate in and out). Below a certain size, the costs of the extra "structure" will outweigh the benefits of modularity.
There is also an inherent reduction in flexibility to the module itself; it must be designed to fit inside the "structure", so upgrading in mid life to carry larger guns, missiles or torpedoes might be difficult to impossible. Should that happen then the entire fleet of vehicles and modules become obsolete. In order to lessen the chances of that happening, designers must make a conscious effort to leave room for expansion. This is often going to be fought on cost cutting grounds, so there will be a lot of tension during the design and validation phases.
Modularity has come down a lot in both cost and minimum size. Remote Weapons Stations (RWS) can fit on a wide variety of vehicles ranging from jeeps to Infantry Fighting Vehicles and are essentially "drop in" units so long as the vehicle can accommodate the turret ring and has room somewhere inside for the operator. Modular turrets for a wide variety of vehicles also exist. Modularity is also theoretically much easier on ships, due to the great size of the ship and lower structural costs of having modularity, the ultimate example would be to build weapons mounts like VLS missile systems into ISO containers and outfit a battle group of container ships to carry your arsenal (a warship like a frigate or destroyer can supply the targeting information and control the launchers remotely). The Lockheed "Sea Slice" (http://www.globalsecurity.org/military/systems/ship/sea-slice.htm) and the Littoral Combat Ship are designed around carrying purpose built modules for various war fighting functions, for example.
For a tank, modularity could be a good thing with today's state of the art. The IDF's Merkava and Namer are built using many of the same basic components, and the Russian T-14 Armata is a very modular system, with a wide variety of AFV's scheduled to be built using the platform as the basis (the T-15 IFV is the first, but expect engineering vehicles, air defense systems and other types of AFV to appear in the future). The main downside is that everything in both the Merkava/Namer and T-14 Armata family are scaled around the tank, so there is a certain minimum size and weight associated with these systems. Depending on you strategic situation, this might not even be a bad thing.