Use a lookup table for masks in CompactIntArray.