Move Array Element

Write a function to move an array element from one position to another.

Asked in SironaMedical frontend interviews