Masked indexing for arrays.
Update sample code.