Adding this in case anyone is looking to use the filter function to filter out not visible cells without using a helper column.
You can combine ROWS, SEQUENCE and INDIRECT to force excel to feed an array into and out of SUBTOTAL (or whatever other function you like). In my opinion this is easiest in a LET function, but up to your use case. Example below.
Working backwards, [YourArray] is passed to ROWS to grab how many rows are in your array. This is then used by SEQUENCE to make an array of row numbers, using 1 column, 1 step and start position of 1. This is then combined with the column letter (in the example below this is E) into an address string for each row number passed from SEQUENCE, creating an array of strings {"E1";"E2";"E3";....}.
This array is passed to INDIRECT in A1 format which outputs as an array of cell address' {E1;E2;E3;....}.
SUBTOTAL then takes the array of address' and evaluates each individual address before returning it to the array. If E1 & E3 are visible and E2, the array will look like this {1;0;1;...}.
It then passes the array to FILTER as a TRUE FALSE for each cell in the column.
Example:
=FILTER([YourArray],SUBTOTAL(3,INDIRECT("E"&SEQUENCE(ROWS([YourArray]),1,1,1),TRUE)),"")
Note: This formula checks for visible rows.