Array generator and random stuff.