Simulating a Malloc with char arrays