HEX string to unsigned long.

Would a simple for loop work for this with the += compound operator?

By itself, no it wouldn't.
But some left shifts or some multiplies would sort it out.

Edit:

BE 1F A8 13.

Do you mean you want the sum of those values (0x198) in a 32 bit variable, or the value 0xbe1fa813 in a 32 bit variable?

Do you know the endianess of the input value?
uncompiled untested

unsigned long var = 0;
for int (int i = 0; i < 4; ++i) {
  var <<= 8;
  var+= array [i];
}