If you want a simple true or false you can use 'array contains value' where the value is text.text. It depends what kind of data you are trying to pull from the array. Do you just want to know if it exists, or do you need to know its position?
By the way instead of that global variable logic you can use 'loopindex' as the position in a loop, instead of l.