Find missing value in table or array

Hello,

Is there a way to iterate through a table or array and find missing value in it?
say i have t = {1,1,1,1,1}
and then in some point i remove one of those values and set it to 0

how can i find missing value? and then in some function set this 0 to 1

i read about it in some documents, but cant find it anywhere

any help is appreciated [import]uid: 16142 topic_id: 16231 reply_id: 316231[/import]