Added array example for detach()