Also assuming the main output ois the 4V one, 4x AA cells in series results in a considerably more complex design than either more or fewer cells would. When the cells are brand new they'll deliver about 6.2V dropping to 3.6V fully discharged. That means the regulator must be capable of buck-boost operation.
3x AA would have a maximum voltage of about 4.65V dropping to 2.4V fully discharged so a simpler boost only regulator would be sufficient. There's probably something already available intended for use with a single cell LiPO that will tolerate that input range and that you can buy a demo board for.
6xAA would start at 9.3V dropping to 4.8V at full discharge, but there isn't a lot of energy left in an AA cell between 0.9V and 0.8V on the discharge curve, so if you use a simple buck regulator, you'll still get 90% or more of the energy out of the battery pack before the 5V rail drops out.
Its pointless to try to go further without hard specs for maximum, minimum and average load current for each rail, and whether or not the rails must be maintained for long periods in standby or sleep modes.