Added randomized array generation to be able to test lots.