js array generation for tool