Javascript Empty Array Element Restructuring Debt