First part of splitting array into dict and list.