Create an array from the digits of an input number