How to get the most common element(s) in an array?

So if the first array contained integers from 0-100 rather than 0-4?