McLaren have work to do after a chaotic Azerbaijan Grand Prix qualifying session in which more than a quarter of the field crashed.