Fundamentally, algorithms and programs are the same thing, except that algorithms tend to be expressed more abstractly, e.g., in pseudocode. Thus, one can regard any programming question as a request for an algorithm, which is to be expressed in a particular language.
As such, "algorithms questions" versus "programming questions" isn't black and white. There are shades of grey.
I do feel, though, that some algorithms are so basic that they are just programming tasks. For example, if somebody asks for an algorithm to compute the total of the numbers in some array, then, sure, there's an "algorithm" to do that. However, it's so simple that, in quite a strong sense, "Sum the values in the array" is the algorithm, rather than
total := 0
for each i in [1..length]
total := total + A[i]
At the other end of the spectrum, with something like the AKS primality algorithm, you'd expect the process to be broken down into a number of smaller steps, each of which is much more basic than "Check if n
is prime."
To me, the question we're discussing here (looping through all possible values that an array could take) is at the more basic end of this range. I agree that, it's more complicated than "sum the elements of the array" but it's the sort of thing I'd expect a programmer to be able to implement without needing detailed descriptions of how. So, to me, it's a programming question, rather than an algorithms question.
However, I accept that this is a completely subjective judgement. I see there's a reopen vote in progress and people seem to think the question should be reopened. I disagree but I'm not going to vote against, since I've already had my say and my feeling is "This question isn't quite right for the site", and not "This question is bad and must be closed."