Theoretically, the current implementation also works for non boolean arrays.