DOM to Array and Array to DOM classes