Get Max Index Of Array Javascript Appendchild Div