How to choose the hidden and visible elements

Hi @awilliams )
I want to get the hidden and visible elements in the active view received here (OUT list elements by @Konrad_K_Sobon code)