Add duplicates validation to array

Closes #401.

As suggested only works for literals (numbers and strings).
Inconsistent way to call `hasOwnProperty()` and `valuesSoFar` cannot be undefined.