function initArray(rows, cols) {
	// initialize the array
	const array = new Array(cols);
	for (let col = 0; col < cols; col++) {
		array[col] = new Array(rows);
		for (let row = 0; row < rows; row++) {
			array[col][row] = null;
		}
	}
	return array;
}
Create required arrays for the given layer object
@ignore