Plural.
sort(name)
sort(names)
Clearly, only plural makes sense here.
And then, here:
name[1]
names[1]
Both would make sense in this context.
Therefore, plural is the only one that makes sense when referencing the whole collection and when referencing one item from the collection.