So, the first patch implements the idea of a helper function that could be applied by a plugin as discussed with nacin. The second one uses the global array for performance reasons but runs in core and collects all post IDs with updated metadata which is what we discussed with wonderboymusic. The third update updates only post metadata which was found thanks to an issue with Query Monitor by johnbillion that we debugged here.