is there a way to use isempty for a array, and if it is empty, then store those values into a new array?