Query Last Value in Fixed Length Array With Empty Values
SELECT distinct Name, loc 
FROM (
  SELECT  *, last_value(Location) over (partition by Name) as loc 
    FROM (SELECT Name, unnest(Location) as Location FROM table)  x) y;


Should answer your question