Either party to an action may challenge the array of jurors for any legal cause, which must be done by motion setting forth particularly the causes of challenge, and the party opposing the challenge may join issues of law or fact on such motion, and the issues so formed must be tried and decided by the court.