I'm not entirely sure what your problem case is. That's because you have not provided code that reproduces the issue. You have provided only a procedure and a vague description that things goes badly when something else calls that procedure.
I can imagine that one problem might be that you are trying to use the index 0, which is not guarded for by your conditional. Note that you cannot index a list by the position 0. I adjust the conditional for that case below.
Another possible difficulty might be premature evaluation where you call f with an unassigned symbolic argument. Your description mentions that you dealt with some prior, similar issues using `` quotes, ie. single left quotes or name quotes. You probably meant single right quotes instead (ie. unevaluation quotes), in order to delay evaluation or prevent premature evaluation. Below I show an alternative to using unevaluation quotes, which may be more robust since single right quotes may get stripped off inadvertantly by intermediate evaluation.
The following supposition that you stated, about how Maple evaluates procedure bodies, is completely wrong. You wrote, "It seems that maple tries to evaluate everything in the proc regardless of the actual inputs used or the if statements before the evaluation(unlike traditional programming which can be sequentially reasoned)."
The problems likely stem from how you are calling your procedure f. That's why code that can be run to reproduce an equivalent failure is important.
Perhaps this will help.
f := proc(i) local A;
if not i::numeric then return 'procname'(args); end if;
A := [3,4,5];
if i <= 0 then return 0; fi;
return A[i]; end proc:
0, 0, 0, 0, 0, 3, 4, 5
foo := f(max(0,j-1));
foo := f(max(0, j - 1))