To make sure we understand each other, let's assume your array
is indeed 256bit aligned (which is equivalent to your 32 bytes alignment).
Then, yes, your #pragma omp simd aligned(array:32)
is safe, irrespective of the length of the array or the size of the type of the array. The only thing that matters is the address pointed at by the "pointer" used to reference the array.
EDIT: I realised that my answer, although correct, was a bit dry since it was just me answering, but without any "official" support for it. So here are some excerpts of the standard to sustain my answer:
From the OpenMP 4.0 standard §2.8.1:
[C/C++: The aligned clause declares that the object to which each
list item points is aligned to the number of bytes expressed in the
optional parameter of the aligned clause.]
The optional parameter of the aligned clause, alignment, must be a
constant positive integer expression. If no optional parameter is
specified, implementation-defined default alignments for SIMD
instructions on the target platforms are assumed.
[...]
[C: The type of list items appearing in the aligned clause must be
array or pointer.]
[C++: The type of list items appearing in the aligned clause must be
array, pointer, reference to array, or reference to pointer.]
As you can see, there are no assumptions on the type of the data pointed or referenced by the variable used inside the aligned
clause. The only assumption is that the address of the memory segment pointed is byte-aligned to the optional parameter, or to some "implementation-defined default alignments" (which BTW strongly encourages me to always give this optional parameter since I have no idea what this implementation-defined default value might be, and more to the point, whether I'll be sure that my array is indeed aligned this way).