Locals were trying to coax the herd of elephants back into the forest when one suddenly became violent