code: def maskAt(self, index):
          
          if isinstance(self.mask, bool):
              return self.mask
          else:
              return self.mask[index]
docs: Returns the mask at the index.
  
              It the mask is a boolean it is returned since this boolean representes the mask for
              all array elements.