Generating grid via array size.