Re-add and rework reformat_array method