Add function component() to entity that handles access to components. Make components array private.