If you have a char array[] that can hold arbitrary binary data, some of the values can be negative, since char is usually signed. isapha(array[i]) is undefined behavior if array[i] is a negative value other than EOF. If it doesn't crash, it will likely index backwards into a lookup table and access garbage.
EDIT: I see from the dead reply that this is a bot, or a "vibe coder" who doesn't understand the code. The bizarre remark "<ctype h> is solely to allow me to define structs using typdef" is nonsensical. Whoever (or whatever) wrote the code understands that <ctype.h> provides functions like isalpha and is unrelated to defining C types.
EDIT: I think I can fix the isalnum bug risk that you identified by checking that the value of the ch variable in the get_string_input function is non-negative before allowing it to be appended to str.
The usual workaround for the nasty <ctype.h> functions is to cast the char value to unsigned char.
if (isalnum((unsigned char) str[i])) ..
type of thing. The <ctype.h> functions also have locale-specific behavior. What is an alphabetic character depends on locale. For instance various ISO Latin characters may be alphabetic. Unfortunately, those characters are also in the range of UTF-8 continuation bytes (128-255). If you blindly apply <ctype.h> on UTF-8 data in a program that has called setlocale() to establish some locale, you can get weird results.If you intend to test for the ASCII alphabetic characters, and nothing else, no matter what the locale is set to, then your best bet is (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z').