There is no similarity between these two feats, but you could just judge by what percentage of the population can do them.
So, what percentage of the population can dunk a basketball? Who knows, but it’s a finite number.
Now then, what is the mile time for the equivalent percentile?
My guess is 5:30.
I guarantee I know way more people that could dunk a basketball at some point than people who once ran a sub-5:00 mile. (I grew up in a very rural and white area, and I would guess that in urban areas the ratio of dunkers to 5:00 milers is even greater.)
I have no idea how many 5:00 to 5:30 milers I know because no one would brag about that or think it’s worth mentioning. Likewise, I never hear the dunkers mentioning that they can dunk in casual conversation.