mesa: fix incorrect type when allocating arrays