$error_array = array_fill_keys(array('index1','index2','index3','index4'), 'default value');
However, the question to ask yourself might be, "Do I really need to set default values?" You could just create the empty array. Then if/when you detect any errors, add them to the array with the desired index. When looking for specific errors, you can do if(count($error_array)) to see if there are any errors at all, and you can look for a specific error by if(array_key_exists('index_name', $error_array)).