array mask trick