user34344: I am trying to learn more about arduino programming, and recently i've written functions for randomizing and then modifying a single array. Now i'd like to do the same for four individual arrays. This is where i'm getting stuck. My questions:
Am i right to assume that it's not possible calling a function for multiple individual arrays?
Perhaps a separate question, but if a class or struct would be more suitable for multiple instances, what are the major differences worth considering to choose the right approach?

user41033: Are you trying to use the same function for different arrays at different times, or are you trying to use a function that handles four different arrays at the same time?
If the former, you'd write something like
void myfunc( T *arr, size_t size ) // where T is the type of the array
{
  for ( size_t i = 0; i < size; i++ )
    arr[i] = some_new_value();
}

then call it for each array:
T arr1[N];  // where T is int, float, double, whatever
T arr2[M];
T arr3[O];
T arr4[P];

myFunc( arr1, N );
myFunc( arr2, M );
myFunc( arr3, O );
myFunc( arr4, P );

This assumes all the arrays have the same base type (e.g., they're all arrays of int).
If you want a function to work on four arrays simultaneously, you'd write it as
void myFunc( T *a1, size_t a1_size,
             T *a2, size_t a2_size,
             T *a3, size_t a3_size,
             T *a4, size_t a4_size )
{
  // code for handling each array
}

While I wrote it such that all the arrays have the same type, it doesn't have to be this way.  Each array can be a different type (a1 can be int, a2 can be double, etc.).  

34344: <p>I am trying to learn more about arduino programming, and recently i've written functions for randomizing and then modifying a single array. Now i'd like to do the same for four individual arrays. This is where i'm getting stuck. My questions:</p>

<p>Am i right to assume that it's not possible calling a function for multiple individual arrays?</p>

<p>Perhaps a separate question, but if a class or struct would be more suitable for multiple instances, what are the major differences worth considering to choose the right approach?</p>
 41033: <p>Are you trying to use the same function for different arrays at different times, or are you trying to use a function that handles four different arrays at the same time?</p>

<p>If the former, you'd write something like</p>

<pre><code>void myfunc( T *arr, size_t size ) // where T is the type of the array
{
  for ( size_t i = 0; i &lt; size; i++ )
    arr[i] = some_new_value();
}
</code></pre>

<p>then call it for each array:</p>

<pre><code>T arr1[N];  // where T is int, float, double, whatever
T arr2[M];
T arr3[O];
T arr4[P];

myFunc( arr1, N );
myFunc( arr2, M );
myFunc( arr3, O );
myFunc( arr4, P );
</code></pre>

<p>This assumes all the arrays have the same base type (e.g., they're all arrays of <code>int</code>).</p>

<p>If you want a function to work on four arrays simultaneously, you'd write it as</p>

<pre><code>void myFunc( T *a1, size_t a1_size,
             T *a2, size_t a2_size,
             T *a3, size_t a3_size,
             T *a4, size_t a4_size )
{
  // code for handling each array
}
</code></pre>

<p>While I wrote it such that all the arrays have the same type, it doesn't have to be this way.  Each array can be a different type (<code>a1</code> can be <code>int</code>, <code>a2</code> can be <code>double</code>, etc.).  </p>
