You could effectively do this partly by computing all these with afni commands first - 3dclust and 3dROIstats. The clusterize plugin generates an equivalent 3dclust command you could use in your script. Load these computed datasets and jump to the locations with a plugout drive command.