Putting stuff in ordered array