In your code index
must be of integer type - this is pretty much what error message says. JSON array is always plain array, associative ones are called JSON objects.
Example:
foreach (size_t index, Json value; configuration["array1"]) {}
or simply
foreach (index, value; configuration["array1"]) {} // type inference
Update: changed int
to size_t
to match actual opApply signature