How?
CL-USER> (remove-if-not #'evenp '(1 2 3 4 5))
(2 4)
CL-USER> (remove-if-not #'evenp #(1 2 3 4 5))
#(2 4)
CL-USER> (loop for x in '(1 2 3 4 5) when (evenp x) do (format t "~&~a~%" x))
2
4
NIL
CL-USER> (loop for x across #(1 2 3 4 5) when (evenp x) do (format t "~&~a~%" x))
2
4
NIL
Even a function like: (defun print-evens (sequence)
(loop for i below (length sequence)
for x = (elt sequence i)
when (evenp x)
do (format t "~&~a~%" x)))
Works for both, although it's considerably more efficient for arrays.> Even in the 2000s we had to hand write Java Iterators and fear mutation while iterating .. that sort of things.
And even in Lisp, the standard specifies "The consequences are undefined when code executed during an object-traversing operation destructively modifies the object in a way that might affect the ongoing traversal operation."