Advice for approaching data locality improvements in legacy code

I read the part on Numerical Recipes (Fortran 90 edition) about array syntax, but I think it is a bit outdated. I tried coding up a simple dynamic programming example in the post linked below and it turned out that the versions using array syntax instead of loops are slower. The code of the example below is also available on github