Here's my take. The rectangular boxes are indeed tool boxes. The peaked boxes are the crew member "grips" that they carried their lunch, rulebooks, change of clothes, etc.
Back when locomotives were assigned to specific runs and had assigned engineers, I could see each engineer having his own set of tools that he kept on his assigned locomotive. As the smaller locomotives had limited space for tool storage, a separate box was needed.
When the RR decided to pool the locomotives, and assign them to whatever job was needed that day, the tool boxes got pooled also. When an engine was called for a run, it was the hostling crew's job to supply the necessary tools for the engine. So, somewhere, there needed to be a stack of tool boxes to be put on each outbound engine. Again the smaller locomotives needed to have real tool boxes, while the larger locomotives had space in the boxes built around the water tank valves on the front corners of the tenders that were, and still are, a handy place to stash tools.
As Gunnison was the last bastion of small locomotives on the narrow gauge, perhaps the foreman thought this was a good solution of where to keep the tool box supply handy when he was still dispatching several small locomotives on a regular basis.
The tool boxes DID NOT contain flagging supplies. Putting torpedoes in a box of steel tools that was being thrown around, would have been highly dangerous. That is why there were separate boxes on the back wall of the cab for flagging supplies.