Self-Supervised Learning of Brain Dynamics from Broad Neuroimaging Data