multiwayScale function

Scale a multi-way array