Refactor UI to use array of object pointers

Fix objects not appearing in editor preview