Generalized update and draw functions to array of entities