Does glUniformMatrix4fv instantly copy data pointed to by the passed in pointer? If not when does it make the copy? Would it be the glDrawElements or glDrawArrays call?
Yes, it copies data during glUniformMatrix4fv call.