In a haphazard manner (2,6)
I believe the answer is:
at random
(Other definitions for at random that I've seen before include "unplanned" , "without purpose" , "willy-nilly" , "Casually" , "Haphazard" .)