For the subway, there's one diesel work engine, which can be transferred by road to another line if/when necessary - Plymouth 50-tonner 04443. It's presently based at Cabot Yard on the Red Line but I remember it being based at Wellington on the Orange Line for many years as well.
http://transithistory.org/roster/" onclick="window.open(this.href);return false; has details about it and other work equipment (as well as a full roster of revenue equipment too).