I already have the code implemented and am currently testing that it works as expected. It was not a lot of code as most of the building block needed were already included, just not being used to trigger the shutdown at the appropriate point.
I have included a safety check/escape in that you will get a notification that a shutdown is pending near the start of the check, but as long as you unset the option before the array operation finishes then the shutdown is aborted.