This is a simplified description of something I've been thinking of:
Some type of power distribution system that would allow you to use one type of battery type, a single source of power--a battery in the buttstock or pistol grip, connected to ceramic insulated + and - busses built into the rails. Connection points would have weather/water proof caps or plugs that would be removed as necessary. Connection to the devices (illuminated optics, NVD, lights and lasers) would be through "battery eliminators" that would replace the device original battery compartment caps with caps that have a short lead and connector for the rail power connector. Optimally, to eliminate cabling, there would be a mount, or family of devices with integral mounts, that would connect to the rail power at the same time it's being attached to the rail.
I know KISS, and it sounds complex and sci-fi, but the advantage would be the use of one type of battery--no more worrying about carrying spare AA, AAA, N, CR123, DL276 batteries for each and every device.
The battery would have to be compact and lightweight (Lithium based?).
power connectors would have to be water/weather proof to prevent shorts.
About a decade ago I read a NASA engineering document about the development of articulated (flexible) ceramic insulated wiring for use on spacecraft. The end result was an abrasion resistant cable that would survive in extreme temperature conditions.