Added improved mixed object to array function