add to_dh method for Arrays