Another solution would be to write a wrapper that store the array like this:
localStorage.setItem('names_length', names.length);
localStorage.setItem('names_0', names[0]);
localStorage.setItem('names_1', names[1]);
localStorage.setItem('names_' + n, names[n]);
Removes the overhead of converting to JSON, but would be annoying if you need to remove elements, as you would have to re-index the array :)