Changed array field layout

moved where the add button is on the array field and added helpers to
determine if the current cursor points to the last item.