Yes, you want to use an Array, which can have any number of dimensions (up to some limit I don't know; I have only ever gone up to 3).
Technically, your "function" as stated is an "equation" to Maple and won't assign to M[n+1]. A proper Maple function definition looks different. If/when you want to assign to an element of M you need to use ":=" instead of "=".
Before you use an Array, allocate it by a statement like
where m,n and o need to be numbers. If the elements of M are all numbers, add a "datatype=float" option to the declaration; this will improve efficiency of your code and also flag errors like non-evaluable expressions.
From your example, it is not clear why M needs to be an array, though, as you have only one index, i.e. a 1-dimensional Array. A Vector may be a more efficient implementation for M in that case.
You do have to worry about things like the exact time of evaluation so the index values are numbers and not unevaluated expressions. Maple's error messages for these cases are often not all that clear. In a straight for...do loop this is usually not an issue; if you use the more efficient and elegant seq() constructs things can get more complicated.
Note that, if you use lists for the parameters (like beta etc.) all of these need to have the same length else Maple will barf.