Rework mouse/touch input

Mouse/touch input now more memory effecient, array is no longer
created/deleted on each event