Add duplicates validation to array

Closes #401.

As suggested only works for literals (numbers and strings).