One way mey be to define it this way:
\def\singleElement#1,#2,#3,#4\close{#3}
And then invoke it using:
\expandafter\singleElement\array,,,\close
This way \singleElement has four arguments, separated by commas, where #4 is ended by \close (well you can choose any \-sequence you prefer for that, just replace \close with, say, \foo everywhere in the above). The way I called it is: your \array contains a list of comma-separated elements, so I make it expand (\expandafter makes TeX read \array before \singleElement, so \array is replaced with the comma-separated list before \singleElement tries to do its job), then \singleElement looks for its arguments, and the commas make sure it finds them, for if \array doesn't have enough elements you would get an error as the commas for \singleElement's arguments would not be found, whereas this way if \array has less than 4 elements (i.e. less than 3 commas) it finds all necessary commas afterwards and the \close to finish argument 4.
Naturally this forces \array to separate its elements by commas, but then you can substitute commas with whatever token you want. If you want dots as separators, you can do:
\def\singleElement#1.#2.#3.#4\close{#3}
and call it by:
\expandafter\singleElement\array...\close
And you can use numbers, punctuation signs, even letter sequences:
\def\singleElement#1abc#2abc#3abc#4\close{#3}
\expandafter\singleElement\array abc abc abc\close
would have abc as the element separator, but that is definitely not advisable :).
Of course, this is a solution that doesn't use pgfplots, so maybe it is not what you expected, but it will work even without loading pgfplots. In fact, it doesn't even require LaTeX: Plain TeX is enough for it.
\documentclass{...}and ending with\end{document}.