remove custom array logic in data-visible/hidden

Prefer use of arr.length property to have less magic.