Refactor unary ufuncs

- Refactor unary ufuncs to support scalar input, scalar input + array output, and array input + array output
- Refactor unary ufunc tests to test scalar input types
- Add sign ufunc
Add flag to set unary ufunc scalar output type