Factor out createBoolArray