The dancers in any music videos are gathered through auditions. Usually, many girls claim that they can dance, but some of them can’t. However, there are a few select girls who have proven that they can do the dancing that is needed for the music videos. Many times girls are selected because they have an agent or belong to an agency that pertains to dancing or entertaining.
Then the pop star’s manager would contact them in order to supply the video with dancers that can do the job. With Bruno Mars, this is probably what happened. They chose the best dancers and then these dancers practiced the routine for the video. Usually a music video is shot over a couple of days at the most and the dancers would have to learn the routine quickly.