You can just use keyword.
In Elasticsearch every field is already an array, see the docs here:
Array support does not require a dedicated
type
And you can set a single value or multiple values when indexing the documents:
{"nickNames": "foo"}
{"nickNames: ["foo"]}
{"nickNames: ["foo", "bar"]}