This applies to all aircraft, so it is not an ideal solution, but there is no way that I know of to determine the actual number of pumps available, and for this update there would be no way to know the number of batteries available, and so there is a similar issue. To get around this, I added a new ini parameter NumberOfPumps that controls how many indices of these simvars are requested. This was an issue when I recently added offsets for FUELSYSTEM PUMP ACTIVE and FUELSYSTEM PUMP SWITCH for indices up to 16. The problem is that if I request the ELECTRICAL MASTER BATTERY simvar for indices > 1 and only one battery is available, this will not produce an error but will flood the MSFS logging console with error messages, making the logging console impossible to use.
However, I could add a new bitwise offset that would hold and change the state of the different indexed batteries. I am reluctant to change the functionality of the existing master battery offset, 0x3102.