You have only defined the type, but then you define all the methods that may be needed. Note in particular that the error comes from trying to print the numbers, if you put a semicolon at the end of the line in the REPL
arr = Array{Int256}(undef, 5);
you don’t get any error.