Writes data to a specified location in memory