# How to calculate and export tasseled caps from MODIS collection in GEE?

I think you were close to a solution. You defined the coefficients as a 7-band image, you just needed to multiply the reflectance data by the coefficients and sum the weighted bands. Note if you multiply a n-band image by a n-band image then the arithmetic will be applied per band which is exactly what we would want with the tasseled cap transform.

Here is the code to apply a Tasseled Cap transform using images instead of arrays:

// get the BRDF corrected dataset
var imageCollection = ee.ImageCollection("MODIS/006/MCD43A4")
.filterDate('2005-01-01','2006-01-01') // filter to one year to prevent memory errors
.filter(ee.Filter.calendarRange(5,9,'month'));

// use regex to select the bands (much cleaner)

// function to mask out of range values from dataset
var qas = function(image){

};

// mask all images in the collection based on quality bands

// tasseled cap function
function tasseledcap(img){
// define the TC coefficients as 7-band images
var brightCoefs = ee.Image([0.4395,0.5945,0.2460,0.3918,0.3506,0.2136,0.2678]);
var greenCoefs = ee.Image([-0.4064,0.5129,-0.2744,-0.2893,0.4882,-0.0036,-0.4169]);
var wetCoefs = ee.Image([0.1147,0.2489,0.2408,0.3132,-0.3122,-0.6416,-0.5087]);

// multiply the Nadir reflectance values by the coefficients and sum across the weigted values
// note that the multiplication is applied per band, band1 * band1 band2 * band2 ... bandn * bandn, band1 * band1 band2 * band2 ... bandn * bandn
var bright = img.multiply(brightCoefs).reduce(ee.Reducer.sum()).rename('brightness');
var green = img.multiply(greenCoefs).reduce(ee.Reducer.sum()).rename('greenness');
var wet = img.multiply(wetCoefs).reduce(ee.Reducer.sum()).rename('wetness');

// concat the transformed images into one image
var tcImg = ee.Image.cat([bright,green,wet]).copyProperties(img,['system:time_start']);
return tcImg;
}

// select the Nadir reflectance bands and apply the tasseled cap transform