How to iterate through a bash array while removing an element? (2 Solutions!!)

Published --