[NRY] Fixes Array Sort functionality

... and returns true or false values to lua sort