Converting char array to sequence of ints (int array)