arrays: append now returns the new index