I think you need to give us a real example, rather than a dummy one.
I strongly suspect that your third array (named array) is not the best choice of structure.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.