mx = np.array([[[1.0, 2.0, 3.0, 4.0, -1.0], [1.0, 2.0, 3.0, 4.0, -1.0], [
    1.0, 2.0, 3.0, 4.0, -1.0], [1.0, 2.0, 3.0, 4.0, -1.0], [1.0, 2.0, 3.0, 
    4.0, -1.0]], [[1.0, 2.0, 3.0, 4.0, -1.0], [1.0, 2.0, 3.0, 4.0, -1.0], [
    1.0, 2.0, 3.0, 4.0, -1.0], [1.0, 2.0, 3.0, 4.0, -1.0], [1.0, 2.0, 3.0, 
    4.0, -1.0]]])
move values of 3D array knowing new coordinates with mask