Changed behaviour for arrays.
Added limitation to the number of autocomplete entries