Space and Move-optimal Arbitrary Pattern Formation on a Rectangular Grid by Robot Swarms