<?php
$_FILES = ["name" => ["aaa", "bbb"], "type" => ["png", "gif"]];
$keys = array_keys($_FILES); // get all the fields name
$res = array_map(null, ...array_values($_FILES)); // group the array by each file
$res = array_map(function ($e) use ($keys) {return array_combine($keys, $e);}, $res); // insert the field name to result array
print_r($res);