convert key arrays to lists