If you really want to create an array rather than a list use either
String[] names = ["lucas", "Fred", "Mary"]
or
def names = ["lucas", "Fred", "Mary"].toArray()
In neo4j-shell you can
list legacy indices with index --indexes
list all label indices and constraints with schema
list indices and constraints for specific label with schema ls -l :YourLabel
In neo4j-browser you can
list all label indices and constraints with :schema
list indices and constraints for specific label with :schema ls -l :YourLabel