My model is based on a vector layer which contains a Field with layer names. The Plan is to pick the input raster (from a directory or directly from the project layers) according to an attribute value of the current object. Until now I got a working result when concatenating the two parts of the path using the expression calculator and just manually writing the file name from the Attribute table:
concat('C:/Users/Johannes/Documents/Betrieb/Onesoil/Sentinel/' , 'NDVI_26-07-2019','.tif')
The issue is to replace the second part of the function ('NDVI_26-07-2019') with the string value of a certain Field ("Sommer_I") of the input vector layer. My initial plan looked like this:
concat('C:/Users/Johannes/Documents/Betrieb/Onesoil/Sentinel/' , map_get(attributes($currentfeature), "Sommer_I"),'.tif')
Resulting in the error: "Field 'Sommer_I' not found"
A very similar question was asked here almost a year ago:
Using an input string in a file path for a input vector layer in QGIS model
The clipped raster is used for a simple regression analysis with yield data (point vector) from a combine harvester. The Regression Result is then clipped by the feature. The same model will be run for 'Sommer_II' and 'Sommer_III', the average of the three regressions should give reasonably exact yield predictions for every area/ (agricultural) field. In my amateurish opinion I think the array function in your last paragraph is not necessary.



