Javascript Empty Array Element Restructuring Water