I found a suitable solution which may not be elegant but it works nontheless:
Template:
<div
v-for="(entry, index) in filteredRoles"
:key="entry.id"
:index="index"
class="permission-form"
>
<h2>{{ entry.system_name }}</h2>
<select
v-model="payload[index]"
type="text"
placeholder="system role"
>
<option class="text-grey-50" value="" disabled selected>
SELECT ROLE
</option>
<option v-for="role in entry.roles" :key="entry.id" :value="role">
{{ role }}
</option>
</select>
<div class="permission-buttons">
<button class="deny" @click="denyPermission(entry.id)">
</button>
<button
class="accept"
@click="
acceptPermission(
fetchResponse.permissions[0].username,
entry.id,
index
)
"
>
</button>
</div>
</div>
As you can see I didn't change a lot. I added an index to the first loop and also added it to payload so that it's now payload[index]. But this isn't fully functional yet because we need a function that populates our array with empty entries so we can write data into the corresponding index.
Mounted function:
if (!this.$fetchState.pending) {
this.fetchResponse.permissions.forEach(element => this.payload.push([]))
}
And that is all. Hope it can help someone in the future :)