improved typed arrays reuse, use intermediate array before write to canvas data