fast For Each Indexed
Iterates through the windows with their indices and performs the given action on each window.
This method is faster and more efficient than List.forEachIndexed.
Parameters
action
The function to be executed for each window and its index.