Multichannel 0→2 and 1→2 transition amplitudes for arbitrary spin particles in a finite volume